webp not optimal when original is png

Created on 24 September 2020, almost 4 years ago
Updated 27 January 2024, 5 months ago

The webp files produced from png originals are suboptimal. The reason is that these are derived from a jpg version (with 100% quality).

So instead of a crystal clear png→webp of 3KB we get a png→jpg→webp of 20KB with jpg artifacts present.

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇬🇷Greece ioannis.cherouvim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States michaellander

    @weseze, can you clarify the part that this patch is missing? Is it the idea that cropping/scaling a JPG image prior to conversion, automatically introduces compression, even if set to 100% quality?

    My hands might be tied from this modules perspective, as we are piggybacking pipelines which naturally happens after image styles are applied. If I had the time, I'd create a module(or better yet, core functionality) whose sole purpose is to generate derivatives and then allow support for multiple formats(AVIF for example) so that ImageAPI optimize can go back to just optimizing and not the derivative piece.

Production build 0.69.0 2024