Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not impressed at this particular demonstration for just that reason. Does WebP provide a savings against jpeg for these photos?

The important question: how does a WebP encoded screenshot look? if there's a huge field of a single color and some text written on the field, are there visible artifacts all around the text? This is a use case for PNG, and one where people can plainly see why a lossless format exists.



> Does WebP provide a savings against jpeg for these photos?

A deceptively hard to answer question!

Why is it hard?

Because both jpeg and WebP (which is really just a VP8 intra frame) can represent images with a variable amount of bits.

But it gets even trickier! How do you measure "savings"? Certainly you can produce 2 images with the same (or similar) bitrates with both webp and jpeg, but how do you say one is better than the other? How can you lower webp's bitrate until it's "quality" measure is the same as jpeg?

Quality metrics such as PSNR, SSIM, and VMAF all exist to try to give a "quality" metric. However, they all have their own flaws that allow an image compression format to get worse subjective quality will improving their objective score (For example, codecs that optimize for PSNR tend to be more blurry than codecs that target SSIM. Grass ends up looking like big blobs of green).

In fact, because x264 was often being beat by other codecs in those metrics they went out of their way to add "cheat" modes for the encoder! You can tell x264 to target PSNR or SSIM :D. Neither are the default.

Just some fun thoughts. Subjectively, I'd say WebP and the newer AVIF or HEIF does a better job than Jpeg (to my eyes). However, I could see why others might disagree.


> Subjectively, I'd say WebP and the newer AVIF or HEIF does a better job than Jpeg (to my eyes). However, I could see why others might disagree.

They can do great with a clean original. But with an original that was already carefully mastered in JPEG format, with quality set to the bare minimum to get a good output... well, lossy compression is lossy, and when there isn't any margin for more loss, the results won't be good. (It's also true that since different lossy algorithms are, well, different, the interaction of two algorithms can be truly awful to look at).

Unfortunately, there are very few image editing pipelines which let one master in anything other than JPEG, PNG, or GIF.


I have a feeling it won’t be better, but for lossy-1 to lossy-2 conversion, has anybody tried using some ML algorithm to ‘recover’ the lost information from the lossy-1 image and then using the lossy-2 algorithm? It would give that algorithm an input that looks more like what it’s designed for.


My money is on AVIF. HEIC-based images that are encumbered and non-royalty free don't have a chance on open source platforms


Adding JpegXL to discussion. For still images it's about the same as AVIF, for high-compression samples AVIF have upper hand, for high-quality samples JpegXL feels better. Also, JpegXL is much faster, simpler, allows progressive encoding


> Does WebP provide a savings against jpeg for these photos?

“WebP seems to have about 10% better compression compared to libjpeg in most cases, except with 1500px images where the compression is about equal.”[1]

mozjpeg JPEGs + AVIF in a <picture> element is the way to go now. You will probably always want to serve JPEGs as an alternative WebP and AVIF and that makes WebP is a waste of disk space for lossy compression of photographs.

I'm amazed the “WebP is such a goated format” blog post made in to the front page of HN.

[1] https://siipo.la/blog/is-webp-really-better-than-jpeg


> This is a use case for PNG, and one where people can plainly see why a lossless format exists.

WebP has a lossless mode for that reason, and is almost a strict improvement over PNG [1].

[1] https://www.ctrl.blog/entry/webp-flif-comparison.html


It's not really a "mode", it's a completely different codec that appears to have been invented by a single random guy at Google and they just released it one day. Much like the rest of WebP.


I'm aware of that, search for my other reply to this thread. Also that single random guy [1] is one of the co-authors of Brotli, WOFF2 and many image compression algorithms including JPEG XL.

[1] https://twitter.com/jyzg


Wow! Violin graphs are neat!


The difference between jpeg and newer formats are most noticible at very high compression ratios.

At high quality settings jpeg is still pretty good for 8 bit photos. Newer formats support higher bit depths.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: