• Resolved x1code

    (@secretja)


    Hi,

    After deleting bunch of images I noticed leftovers of webp images. Is your plugin compatible with LiteSpeed Cache plugin? Thank you!

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

    (@eusebiuoprinoiu)

    Hello, x1code!

    The plugin can be used with all caching plugins. It doesn’t require any special integration. It also doesn’t run on the frontend. (all tasks are performed in the admin dashboard, which should never be cached)

    If you have any orphan thumbnails or WEBP/AVIF images left on your server, it’s usually because the plugin or script that you use to generate them isn’t properly integrated with WordPress. Autoremove Attachments doesn’t delete any files directly. It only tells WordPress what files to delete. The actual removal is done by WordPress. And if WordPress is not aware of all your thumbnails or custom image formats, it will not remove them.

    I don’t know what tool you use to generate your WEBP files, but you should probably switch to something else. It doesn’t matter if you use Autoremove Attachments or not – if WordPress doesn’t track your WEBP images, they will always become orphan files when you remove images from your media library.

    I personally use and recommend WebP Express, which does things the WordPress way. It also provides granular control in terms of quality, delivery, and conversion method. It’s even compatible with thumbnail regeneration, either via the Regenerate Thumbnails plugin or WP-CLI.

    Other good alternatives are ShortPixel and Imagify, but these are paid SaaS services with less control over the end result. (but they integrate well with WordPress and should work without any issues)

    Regardless of which solution you choose, to prevent conflicts or unexpected results, make sure you first remove your old WEBP images from the server.

    Plugin Author Eusebiu Oprinoiu

    (@eusebiuoprinoiu)

    Just a side note, ShortPixel used to have a bug that caused orphan WEBP files when using a double extension. ( image.jpg.webp )
    I don’t remember if this was fixed, but it’s something you should be aware of if you decide to use them.

    Also, keep in mind that WEBP files are generated from their corresponding thumbnails, not from the original uploaded image. (and by default, thumbnails are generated at 82% quality)
    This means your WEBP images are generated using double compression.

    (Unsolicited advice you might find useful)

    If you decide to use WebP Express and you have enough server space, you can prevent this double compression by using the steps below:
    1. Set JPG thumbnail quality to 100%
    2. Tweak WEBP quality to your desired level via WebP Express
    3. Regenerate all thumbnails, without skipping existing thumbnails (preferably via WP-CLI, which is much faster and not prone to PHP timeouts)

    This way, your WEBP files will always be generated from high-quality sources, and you will have full control over the final size and quality of your WEBP files. (via the quality settings of WebP Express)

    Since WEBP is now supported by 96% of all browsers in use, your original PNG/JPG images will (probably) never be seen by your visitors. They will only serve as high-quality sources for generating optimized WEBP files.
    The only downside to this is that you will use slightly more server space.

    You can change the quality of your thumbnails with the code snippet below:
    https://pastebin.com/wmEfzDWu

    Thread Starter x1code

    (@secretja)

    Thank you for info. Yep, it was because LiteSpeed Cache I found the way how to delet them.

    Plugin Author Eusebiu Oprinoiu

    (@eusebiuoprinoiu)

    I’m happy to hear you found the source of your problem…
    If you need any further help, let me know!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Compatibility with LiteSpeed Cache’ is closed to new replies.