Comment by jmillikin

Comment by jmillikin 7 hours ago

4 replies

Most of the code in WebP and AVIF is shared with VP8/AV1, which means if your browser supports contemporary video codecs then it also gets pretty good lossy image codecs for free. JPEG-XL is a separate codebase, so it's far more effort to implement and merely providing better compression might not be worth it absent other considerations. The continued widespread use of JPEG is evidence that many web publishers don't care that much about squeezing out a few bytes.

Also from a security perspective the reference implementation of JPEG-XL isn't great. It's over a hundred kLoC of C++, and given the public support for memory safety by both Google and Mozilla it would be extremely embarrassing if a security vulnerability in libjxl lead to a zero-click zero-day in either Chrome or Firefox.

The timing is probably a sign that Chrome considers the Rust implementation of JPEG-XL to be mature enough (or at least heading in that direction) to start kicking the tires.

latexr 6 hours ago

> The continued widespread use of JPEG is evidence that many web publishers don't care that much about squeezing out a few bytes.

I agree with the second part (useless hero images at the top of every post demonstrate it), but not necessarily the first. JPEG is supported pretty much everywhere images are, and it’s the de facto default format for pictures. Most people won’t even know what format they’re using, let alone that they could compress it or use another one. In the words of Hank Hill:

> Do I look like I know what a JPEG is? I just want a picture of a god dang hot dog.

https://www.youtube.com/watch?v=EvKTOHVGNbg

  • jmillikin 5 hours ago

    I'm not (only) talking about the general population, but major sites. As a quick sanity check, the following sites are serving images with the `image/jpeg` content type:

    * CNN (cnn.com): News-related photos on their front page

    * Reddit (www.reddit.com): User-provided images uploaded to their internal image hosting

    * Amazon (amazon.com): Product categories on the front page (product images are in WebP)

    I wouldn't expect to see a lot of WebP on personal homepages or old-style forums, but if bandwidth costs were a meaningful budget line item then I would expect to see ~100% adoption of WebP or AVIF for any image that gets recompressed by a publishing pipeline.

    • vlovich123 4 hours ago

      It’s subsidized by cheap CDN rates and dominated by video demand.

    • ascorbic 3 hours ago

      Any site that uses a frontend framework or CMS will probably serve WebP at the very least.