Intent to Ship: JPEG XL
55 points by EvanHahn
55 points by EvanHahn
Very excited for this!!
The SSIMULACRA2 scores for AVIF vs JpegXL make it seem like AVIF is overall a better choice except for progressing rendering support, but anecdotally, for non-photography images (like furry art) JXL wins, so I'm happy to see it gain traction.
Yeah those tests don't mean much to me. For photography as well, JPEG-XL always felt like it preserved detail and texture better rather than just smoothing it out.
Exciting!
I'm a little bit confused by their JPEG XL versus AVIF section, though. I mean, I guess it's not too confusing: JPEG XL if you have a specific use case, such as lossless photographs or progressive rendering. But otherwise AVIF seems like the all-around better default for photographs? It usually produces smaller files and already has 94-95% support on caniuse.com, compared to JPEG XL's current 15%.
I think it's mostly that it's describing a nuanced (or: confusing!) reality.
A key thing JXL has is a mode that makes existing JPEGs ~22% smaller with no added loss (you can reconstruct the OG .jpg file bit-for-bit). This is cool because you can roll it out places you might not roll out a new lossy codec. A CDN could do it transparently, for instance. I don't think browsers plan to do this, but they could even reconstruct the .jpg on save in this mode to avoid the 'what's a .webp?' problem.
I've heard positive things about JPEG XL for very high quality images not only for lossless. Some of that might be opinion: AVIF artifacts tend to be more like blurring low-contrast detail entirely away, where JXL's tend to be more like the old JPEG ringing, which conveys that there was high-frequency detail there before, but now it's not the original high-frequency detail.
Early on, JXL encoding was much less CPU heavy than AVIF encoding. Years have passed and I have not kept up with how that changed over time. If it's still the case, it may lead to JXL getting picked up in some places where AVIF so far hasn't taken hold, despite any size difference.
I think it's fair to say that of the two AVIF can pack an image down smaller before artifacts become annoying to the average viewer, and is more effective at lossy compression of screen content like text or line art. AVIF can produce astounding results on photos at low bitrates with the encode effort turned up.
I've done some extensive testing for my own photographs and found I prefer JPEG-XL over AVIF in terms of quality and size. It also has a bunch of useful features like you said.
From the caniuse.com page you listed:
AVIF competes with JPEG XL which has similar compression quality and is generally seen as more feature-rich than AVIF.
I was surprised to see them say AVIF > JPEGXL. The articles I have read over the years have said the opposite.
Eg https://tonisagrista.com/blog/2023/jpegxl-vs-avif/
Maybe the encoders have been evolving?
AVIF encoders have been evolving, while JPEG XL encoder hasn't been improved that much since ~2023 because there wasn't a ton of interest in it (because it wasn't in browsers). There's a ton of room where JPEG XL can improve on the encoding front, just that the work hasn't been put in yet.
Finally!!!! I have been tracking and pushing for this for so long. Damn, that is good news. We can have Nice Things!
Chrome are also intending to ship
Oh? That was an whole ordeal a few months back, that Chrome refused to support JPEG XL, I suppose they changed their mind?
The JPEG-XL drama has been going on for four years! https://lobste.rs/search?q=title%3Ajpeg-xl&what=stories&order=newest