• Resolved Camilo

    (@camilo517)


    I use webp images and when deleting woocommerce products it does not delete the images

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eusebiu Oprinoiu

    (@eusebiuoprinoiu)

    Hello, Camilo!

    The plugin uses the native function provided by WordPress for removing media files. It doesn’t alter it in any way. If your WEBP files are not tracked by WordPress or by the plugin you use to generate them, you get orphan files on your server. (it doesn’t matter if you remove your images manually or automatically with a plugin like Autoremove Attachments)

    I’m guessing the plugin you use to generate your WEBP files does a poor job of tracking them.

    Also, keep in mind that not all child attachments are removed when the parent post, page, or custom post type is deleted. If an image is used in multiple locations, it will be skipped.

    For example, if you have an image attached as a child to a product and you use that image somewhere else (like in the body of a post, a gallery, or if it’s set as a featured image), when you delete your parent product, the image will be kept and attached as a child to the post it was reused in. (it changes parents)

    You also need to make sure:
    – that your images are actually attached as child attachment to your posts, pages, and custom post types
    – that you remove your post, pages, and custom post type from Trash (a soft delete doesn’t trigger the removal of your attachments)

    Plugin Author Eusebiu Oprinoiu

    (@eusebiuoprinoiu)

    Also, you haven’t specified. Are you uploading your images as WEBP or are you using a plugin like WEBP Express, ShortPixel, or Imagify to generate them on the fly from PNGs and JPGs?

    I know, for example, that there is a bug in ShortPixel (yet unresolved) that causes orphan files when the plugin is configured to use double extension for WEBP. (image.jpg.webp)
    https://www.ads-software.com/support/topic/orphan-webp-files-on-removal

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘webp’ is closed to new replies.