WPIntell

Source evidence

Solution for : Error while deleting an image

WebP Conversion · support · 2026-02-04T18:30:00+00:00

mixedsentiment
mediumseverity
0.56relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 25 rows with source links

12.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
anissneo resolved
Hi, If the plugin is activated, when deleting an image, an error appears: Error in deleting the attachment. The plugin was registering a delete_attachment hook that called a method webpc_remove_original() in the main class, but this method didn’t exist. This caused a 500 error when trying to delete an image. Solution Add the missing method webpc_remove_original($attachment_id) to the WEBPCbySheepFish class. This method simply calls the static method of the same name in the WebpC_Remover class. Add method in webp-conversion.php (after webpc_remove_originals_selected ) – Line 674 (just before function webpc_convert_single ) : <?php /** * Hook callback for when an attachment is deleted. * Removes the backup/original file associated with the attachment. * * @param int $attachment_id The attachment ID being deleted. * @return void */ public function webpc_remove_original($attachment_id): void { WebpC_Remover::webpc_remove_original($attachment_id); } Root Cause Line 91 in webp-conversion.php registers the hook: add_action('delete_attachment', [$this, 'webpc_remove_original']); But the method webpc_remove_original() was not defined in the class, causing a fatal error when WordPress tries to delete an attachment. Regards Hi @anissneo , Thank you for the solution, already fixed the issue. Please update plugin to the latest version. Best Regards, Denys Alright, cool. Great plugin btw, i use it on several sites. Nice work

Comments

2 shown
Denis 2026-02-04T19:46:00+00:00

Hi @anissneo , Thank you for the solution, already fixed the issue. Please update plugin to the latest version. Best Regards, Denys

anissneo 2026-02-04T20:32:00+00:00

Alright, cool. Great plugin btw, i use it on several sites. Nice work