Support » Plugin: EWWW Image Optimizer » Webp is not generated for thumbnails

  • Resolved amauryt

    (@amauryt)


    Hello,

    I have activated your plugin and I try to use it for it’s webp feature.

    It’s working for the main image : xxx.png has it’s xxx.png.webp version generated, but all thumbnails doesn’t…
    xxx-500×500.png xxx-1024×1024.png doesn’t have their respective webp generated.

    In the settings I have enabled “webp conversion” “JS WebP” and “Force Webp”.

    Thanks in advance for the help !

    BR

    • This topic was modified 1 month, 2 weeks ago by amauryt.
Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Hi @amauryt!
    Let’s start with Force WebP, why did you enable that?
    Note that WebP is NOT smaller than PNG 100% of the time, and this is likely why many of your thumbnails are not converted. If you use Force WebP, you’ll end up delivering even larger images to your visitors, and I suspect that’s not what you want.
    The only time Force WebP must be used is if you use S3 + a CDN like Cloudfront, and you have local copies of your images removed. Otherwise, I’d stay far away from that option.

    Thread Starter amauryt

    (@amauryt)

    Hello @nosilver4u

    Thanks for the quick answer and clarification regarding forceWebp.
    Anyway, it doesn’t seem to work either.

    My thumbnails are sometimes near 1mo for the xxx-1024×1024.png files.
    Other extensions can decrease their size to 100ko so I don’t think it’s due to the size that the thumbnails are not generated.

    Any other clue ? You confirm that normally the thumbnails should be generated as webp ?

    Thanks again for your help,

    BR

    Plugin Author nosilver4u

    (@nosilver4u)

    If another extension can take a 1MB PNG file down to 100kb, then it is using lossy WebP conversion, and EWWW IO uses lossless on PNG images by default.

    And yes, EWWW IO would attempt to convert any image, including thumbnails, to WebP.

    If you’d like to try lossy WebP mode on your PNG images, we have an “override” for that. Just add this to your wp-config.php:
    define( ‘EWWW_IMAGE_OPTIMIZER_LOSSY_PNG2WEBP’, true );

    *put it anywhere after the opening <?php tag, but before the place where it tells you to stop editing.

    Thread Starter amauryt

    (@amauryt)

    Hello @nosilver4u,

    Thanks again for the quick answer.

    Without enabling the lossy webp, main image is reduced from 920ko (png) to 117ko (webp).
    Using lossy webp set to 80, image is reduced from 920ko (png) to 44ko (webp).

    BUT, no thumbnails have been generated in both test… whereas the xxx-1024×1024.png size is 678ko

    (you can see the screenshot here : https://ibb.co/MRg6gS6)

    Thanks again for the help.

    BR

    Plugin Author nosilver4u

    (@nosilver4u)

    Oh that IS strange. Would you be able to post a link to the original PNG image, as well as a system report from Tools->Site Health->Info
    Lastly, please copy the debug information from the EWWW IO support tab and post that. Please use pastebin.com or something similar, since they don’t always display nicely on the forum posts.

    Thread Starter amauryt

    (@amauryt)

    Hello @nosilver4u ,

    Thanks for your time.

    All 3 info are here : https://pastebin.com/yJSB2uPV

    Thanks again,

    BR

    Plugin Author nosilver4u

    (@nosilver4u)

    Ah, that explains it a bit more (though we have a bug it seems). Your site is running in “exec-free” mode since you’re on a more restrictive web host. So while EWWW IO won’t optimize PNG images otherwise, the plugin CAN use the built-in PHP libraries (Imagick) to make WebP versions of the images.

    But when I test my site in that same mode, it does the same thing, full-size gets a .webp image, but the thumbs don’t!
    I see why it’s happening, so it should be easy to fix.

    Plugin Author nosilver4u

    (@nosilver4u)

    You can grab the fix from here: https://docs.ewww.io/article/73-update-from-github

    Otherwise, it’ll be in the next release, though that might be a week or two.

    Thread Starter amauryt

    (@amauryt)

    Waow, thanks for this reactivity ! That was fast 🙂

    I’ll try your fix tomorrow and keep you posted !

    Thanks for the help !

    Thread Starter amauryt

    (@amauryt)

    Hello @nosilver4u

    Thanks for the fix, I have tested it, and it now generate the webp for the thumbnails !!! 🙂

    My last concern is regarding jpg, none have their webp version (neither the main one or the thumbnails).

    Thanks again,

    BR

    Plugin Author nosilver4u

    (@nosilver4u)

    Hmm, that one I can’t reproduce, could you re-post your debug information from the support tab?

    Thread Starter amauryt

    (@amauryt)

    Hello @nosilver4u

    Thank you,

    New debug info are available here with one of the jpg images:

    https://pastebin.com/Fnn8pYby

    Thanks again for this quick support !

    BR

    Plugin Author nosilver4u

    (@nosilver4u)

    Okay, I thought I had seen this earlier, but that confirms it, your WebP quality looks to be set at 100 somehow, which is a bit silly. If you want WebP, either keep the default (75), or maybe go to 80-85. See what that does for the JPG conversion.

    Also, I checked it on my own site with quality 100, and I still got a WebP image for that JPG you posted a link to, though it was 450kb. Not great compared to the 250kb WebP on quality 75.

    If you’re losing detail, there’s actually a better setting for preserving that, which is the “yuv_sharp” option, enabled with this in your wp-config.php:
    define( ‘EIO_WEBP_SHARP_YUV’, true );

    Thread Starter amauryt

    (@amauryt)

    Hello @nosilver4u

    Thanks for your time and patience.

    When I firstly try the webp generation, a 1Mo png was converted to a 500ko webp.
    Then I tried our suggestion with the define( ‘EWWW_IMAGE_OPTIMIZER_LOSSY_PNG2WEBP’, true ); with a webp quality to 100, this same 1mo png was converted to a 100ko webp. It was sufficient for me and did not change this value.

    Trying with a quality to 85 down the size of the webp to 65ko.

    In contrary a quality to 100 for jpg was converting a 500ko jpg to a 700ko webp (so without forcewebp those webp were not created).
    Trying with a quality to 85 is creating a 300ko webp !

    BUT, there is always a but lol, if I upload a new image (the one that I have linked you), all size have their webp, thumbnails and main one), but if I try to regenerate the thumbnails from the media library of this same image (that was uploaded some weeks ago), all thumbnails have their webp version except the main one… (see https://ibb.co/h8LXp8R). Maybe it is again a bug related to exec-free mode ?

    Anyway, thanks again for the time and help

    BR

    • This reply was modified 1 month, 2 weeks ago by amauryt.
    • This reply was modified 1 month, 2 weeks ago by amauryt.
    Plugin Author nosilver4u

    (@nosilver4u)

    Yup, all of that makes sense, except that last bit where you regenerate the thumbs. EWWW IO will clean-up it’s .webp files, though I think maybe it’s doing the full-size also when it shouldn’t.
    The way that works, is that if a given image is re-processed by EWWW IO (like it will be for a thumb regen), the WebP variant is only re-created if the filesize changes. Further, if the file-size of an image (during re-processing) is still identical to the optimized version, like it would be for the full-size image during a thumb regen, then it gets skipped entirely.
    I’ll double-check on that and see what I can figure out.

Viewing 15 replies - 1 through 15 (of 25 total)
  • You must be logged in to reply to this topic.