• Resolved dajanas

    (@dajanas)


    Hi,

    in the settings of Performance Lab you can activate the WebP upload. Means that when you upload JPG images, WebP versions are automatically created as well. This works for me. But where exactly can I set the quality of the WebP conversion? I haven’t found any info on this and no setting in Performance Lab’s settings.

    Just as an example:

    On my server are the following files:

    example_600x500.jpg (52 KByte)
    example_600x500.webp (54 KByte)

    You can see here that the JPG version is 52 KByte, the WebP version is even 2 Kbyte bigger. Shouldn’t it rather be that WebP is smaller?

    Therefore the question, where can I set the quality for WebP?

    Regards

Viewing 1 replies (of 1 total)
  • Hi @dajanas, thanks for getting in touch!

    But where exactly can I set the quality of the WebP conversion? I haven’t found any info on this and no setting in Performance Lab’s settings.

    At this time, it’s not possible to set a specific image quality for the WebP images that are generated within the plugin UI. You can, however, do this with a filter: https://developer.www.ads-software.com/reference/hooks/wp_editor_set_quality/.

    You can see here that the JPG version is 52 KByte, the WebP version is even 2 Kbyte bigger. Shouldn’t it rather be that WebP is smaller?

    In most cases, the WebP image _should_ be smaller than the JPEG, but as per your example, there are times when it is actually larger. Beginning with version 1.3.0 of the Performance Lab plugin, WebP images that are larger than the uploaded JPEG image should be discarded, as noted in this GitHub issue.

    Can you make sure that you’ve updated the Performance Lab plugin to the current version (v1.4.0, released earlier this week) and try uploading an image again that previously had a larger WebP version? You should see that the WebP version will be discarded and not used now if it is larger than the original JPEG.

    Let me know if you have any other questions on this!

Viewing 1 replies (of 1 total)
  • The topic ‘Where to set Webp quality?’ is closed to new replies.