ImageOptim icon indicating copy to clipboard operation
ImageOptim copied to clipboard

[REQUEST] Will this tool ever support WebP ?

Open change-thegame opened this issue 1 year ago • 5 comments

WebP is now the new standard for images on web. Would be amazing to include the cwebp library in this. 🙏 https://developers.google.com/speed/webp/docs/cwebp

p.s sorry if this has already been asked of

change-thegame avatar Aug 24 '23 00:08 change-thegame

Answer: No, webp in it's current state can not be supported. It has no optimisation tools, and it has no specification which allows for alternative implementations which could provide better compression in a compatible manner.

See some of the many previous issues: #249 #278 #338

NiklasBr avatar Aug 24 '23 15:08 NiklasBr

Same question but for AVIF.

Would you consider conversion or is the focus purely on optimizing? At least from that point I get that you won't support webm, avif.

Conversion from jpeg to avif/webm might be an interesting use case though.

kasperkamperman avatar Oct 12 '23 16:10 kasperkamperman

I think the way people are using this tool and the author's intent are slightly different.

  • The author wants to create a tool that optimizes a file. Webp as an input can't be optimized, and as an output is a different file which isn't in line with the author's intent.
  • Users utilize ImageOptim to generate smaller file sizes for their clients. We would welcome a smaller file size even if that meant generating a new file.

I think there could be an opportunity for a paid version of ImageOptim? I know I'm extremely happy with ImageOptim and if it could also generate files like webp I'd be happy to pay for it. Just a thought.

radicaldotgraphics avatar Jan 17 '24 17:01 radicaldotgraphics

I just ran into this issue and decided to try to make my own version of ImageOptim that supports WEBP: https://github.com/blopker/alic If anyone tries it out, I'd love some feedback! It does all the processing with threads instead of seperate processes, which seems to make optimizing much faster too. It's also using a newer set of tools so the optimizations are ~5% better, which is cool.

blopker avatar Feb 07 '24 23:02 blopker

Pinging this because despite newer codecs like AVIF getting wide browser support, WebP still has a place today notably as a lossless codec. While AVIF has superior lossy encoding, most of the time it does much worse than WebP for lossless, especially for artificial images. WebP lossless DOES have a specification, and while to my knowledge, there is no alternate WebP encoder, libwebp might be able to produce a smaller file if set to a higher "effort" than when the image was created (see the "-z" flag in cwebp, or the WebPConfigLosslessPreset function in the library), or simply because improvements have been made to the library in the meantime. And of course most of the time a PNG can be converted losslessly to a smaller WebP file, assuming you allow changing the image format.

maryla-uc avatar Jul 29 '24 15:07 maryla-uc