News for hackers. Stuff that matters.
Re:JPEG XL vs. AVIF for web use-cases by bitpush on Friday October 16, 2026 @01:16PM (#50121300)
I'm only casually following JPEG-XL and my impression from previous reading here on HN was that JPEG-XL was the best solution available for a wide variety of usecases, but it looks like numbers dont match that claim?
Re:JPEG XL vs. AVIF for web use-cases by adrian_b on Friday October 16, 2026 @02:38PM (#50122508)
JPEG-XL is not the best solution if you want small low-quality images, to reduce your costs for hosting some Web site. AVIF seems appropriate for that goal.

JPEG-XL seems to be the best solution for storing and distributing high-quality images. For myself, I want high-quality images, so JPEG-XL is what matters, both for new images and for compressing the old archives of JPEG images.

While I have my own Web server, it is for private use and not for commercial purposes, so I have no interest in using AVIF to achieve the smallest image sizes, but at a lower quality than I want.

Re:JPEG XL vs. AVIF for web use-cases by jaffathecake on Friday October 16, 2026 @02:46PM (#50122641)
Please read the article. All of the comparisons default to "high" quality, according to JXL's own metric.
Re:JPEG XL vs. AVIF for web use-cases by adrian_b on Friday October 16, 2026 @02:54PM (#50122763)
Most of the comparisons are not about what I would call "high quality" images.

And the article supports what I have said.

Quotation from the article:

> But JPEG XL catches up at very high quality. Around SSIMULACRA2 85, libjxl's default matches AVIF's default, and at maximum efforts, jixel 'extraslow' is ~6% smaller than AVIF s0. jixel 'slow' is 10–13% smaller than AVIF's default from SSIMULACRA2 80 upwards.

Re:JPEG XL vs. AVIF for web use-cases by JyrkiAlakuijala on Friday October 16, 2026 @04:56PM (#50124567)
I believe that:

ssimulacra2 85 is rather close to median quality in the internet

ssimulacra2 90-95 is rather close to high quality in the internet

ssimulacra2 98+ is close to camera quality

Re:JPEG XL vs. AVIF for web use-cases by jaffathecake on Friday October 16, 2026 @05:08PM (#50124748)
'high quality' and 'very high quality' are different things.
Re:JPEG XL vs. AVIF for web use-cases by Gigachad on Friday October 16, 2026 @10:16PM (#50127248)
There’s also data that isn’t needed in the final delivery format but is needed for editing. 8bit vs 16bit color for example. 8 bit is visually all you need for an image, but if you edit it to say being up the shadows, 8 bit will show banding because you’ve stretched it to the point the bands are visible. While 16bit has so much extra data it still looks perfect after being stretched.

JPEG XL is the ideal high end photography format. AVIF seems better for a space efficient web format.

Re:JPEG XL vs. AVIF for web use-cases by Evidlo on Saturday October 17, 2026 @01:54AM (#50128360)
Also the JXL decoder in Firefox and Chrome only returns 8 bits, unfortunately.
Re:JPEG XL vs. AVIF for web use-cases by jaffathecake on Saturday October 17, 2026 @02:10AM (#50128431)
Are you sure about that? Wouldn't that make the HDR example look bad in Chrome? The source image is 16 bit. https://jakearchibald.com/2026/jpeg-xl-vs-avif/#lossy---hdr
Re:JPEG XL vs. AVIF for web use-cases by zbobet2012 on Saturday October 17, 2026 @01:59AM (#50128381)
Human eyes can quite reliably see greater than 8 bit color. While the eye is only able to differentiate about 10 million colors at any given brightness, because its sensitive to brightness in a logarithmic fashion the eye needs about 24 bits of per channel depth to see no banding.
Re:JPEG XL vs. AVIF for web use-cases by Gigachad on Saturday October 17, 2026 @04:01AM (#50128948)
Presumably this is for HDR. In the SDR space I don’t think you’d see the difference between 8 and 16bit. And the way it’s encoded is logarithmic so you can express the visible range with less bits where your eyes are less sensitive.
Re:JPEG XL vs. AVIF for web use-cases by kps on Friday October 16, 2026 @03:17PM (#50123121)
> for a wide variety of usecases

For a wide variety of usecases, not for every isolated usecase. Today, AVIF is better for showing people ads^W^W^W web content delivery. This article is titled “JPEG XL vs. AVIF for web use-cases”. The other article recently discussed¹ is subtitled “Investigating JPEG XL's place as a Web image codec” and ends:

> JPEG XL isn't useless; it is genuinely compelling technology for use cases beyond the Web.

¹ https://news.ycombinator.com/item?id=49690554

(Either way, can we agree to take webp out behind the barn?)

Re:JPEG XL vs. AVIF for web use-cases by jaffathecake on Friday October 16, 2026 @01:18PM (#50121347)
Claims around JPEG XL have always been wild. E.g. this from one of the creators https://x.com/jyzg/status/1592811472073416704
Re:JPEG XL vs. AVIF for web use-cases by bitpush on Friday October 16, 2026 @01:56PM (#50121879)
That's.. horrific. How can someone be this out of touch?
Re:JPEG XL vs. AVIF for web use-cases by F3nd0 on Saturday October 17, 2026 @02:50AM (#50128599)
… are you all reading that as a serious statement, not a joke (possibly in poor taste, but still)?
Re:JPEG XL vs. AVIF for web use-cases by jaffathecake on Sunday October 18, 2026 @12:50AM (#50138006)
Yep. Look at the replies. He's challenged on it, and doubles down. It's not a joke.
Re:JPEG XL vs. AVIF for web use-cases by throw0101c on Friday October 16, 2026 @01:20PM (#50121370)
JPEG-XL can be a quick win since it is possible to do a transcode of all of your existing ('classic') JPEG files with zero (visual) losses in quality.
Re:JPEG XL vs. AVIF for web use-cases by bitpush on Friday October 16, 2026 @01:57PM (#50121895)
If you're transcoding why wont you go to avif or another one? If jpeg -> jpeg-xl uniquely better?
Re:JPEG XL vs. AVIF for web use-cases by pwg on Friday October 16, 2026 @02:01PM (#50121957)
JPEG is a lossy format. JPEG -> AVIF adds a second loss operation. JPEG to JPEG-XL is lossless but with a smaller file size. So one does not further degrade the jpegs beyond what they were already degraded in creating them in the first place.
Re:JPEG XL vs. AVIF for web use-cases by Broiler9437 on Saturday October 17, 2026 @03:06PM (#50134040)
It's a lossless conversion while still saving spaces. You can even convert back to get the exact same file bit-perfect
Re:JPEG XL vs. AVIF for web use-cases by venusenvy47 on Friday October 16, 2026 @04:23PM (#50124087)
I always think of transcode and lossless as opposites. How is this achieved in this format?
Re:JPEG XL vs. AVIF for web use-cases by ksec on Friday October 16, 2026 @04:34PM (#50124265)
It extracts the already quantized DCT coefficients and related data from the JPEG bitstream and re-encodes them with JPEG XL’s more efficient entropy coding and container,

Think of it as zip compression that is specially designed for JPEG and putting the JPEG data in a different/better container.

Re:JPEG XL vs. AVIF for web use-cases by ksec on Friday October 16, 2026 @04:28PM (#50124173)
AVIF ( or even AV1 itself ) has had massive increase in quality improvements over the past 6 years. JPEG XL was close to release in 2020 and finalised in 2021. A lot of the sentiments hold true back then.

JPEG XL has always been targeting high quality encoding metric first before the lower end low BPP images, which AV1 excels at with or without the last 6 years of improvements.

The current top comments about MP3 and LAME is again about how encoder extract maximum potential. JPEG XL was may be the best in 2021, but has been fighting for survival since then.

There a lot of different images that JPEG XL encode better. Screenshots with text is known to be not something they have optimised for or think it could be good at. Lossless mode may be better. Edit: As one of the other comment here proved my point.

Had all of these, even just a hint of AVIF improvement be told, may be the sentiments would have been a little different. But then again I am not one who would trust the same people who sold me WebP and AOM roadmaps.

But at least AV2 is coming. And JPEG XL is finally in every browser. Hopefully we can all have something even better in the future.

Re:JPEG XL vs. AVIF for web use-cases by mdasen on Friday October 16, 2026 @05:00PM (#50124627)
I think many people disliked Google's control of Chrome blocking JPEG XL rather than it being able to compete on its merits.

JPEG XL also has some big benefits for many use cases like lossless re-encoding and supporting higher resolution. AVIF images have a max size of 8192x4352 last I checked. That's not a problem for web images almost all of the time, but there's certainly uses where you might want more. I think AFIV might be limited to 12bit overall while JPEG XL can do 32bit. Again, is that something many will take advantage of on the web? No, but if it's something you care about it might be really meaningful to you.

Also, if you care about the 90% quality level, JPEG XL often outshines AVIF, but when I'm putting images on the web it's often well below that.

Some of it was bad information. I saw some people saying JPEG XL being way less computationally intensive (even less than WebP) and offering much better compression. Some of it was selective data - do you only test things at 95% quality level and declare a winner?

But I think the big thing is that a lot of people wanted the two formats to succeed or fail based on their merits. I think a lot of people don't like AVIF because it isn't well supported outside of browsers - and there can be a hope that the JPEG name would mean JPEG XL would get the kind of adoption JPEG did.

And it's hard to truly compare formats - or benchmark in general. As the article shows, different JPEG XL encoders offer vastly different performance. And when we're dealing with lossy compression, sometimes it can be a bit of personal preference. At some point, people started enjoying the way that MP3 garbled symbols (the instrument) and that was the sound they expected a symbol to make.

Re:JPEG XL vs. AVIF for web use-cases by jaffathecake on Friday October 16, 2026 @05:07PM (#50124731)
> AVIF images have a max size of 8192x4352

This isn't true btw. The format supports up to 64k x 64k, although browser decoders currently fail beyond 16k x 16k.

Not sure when you'd serve something like that on a web page though.

Re:JPEG XL vs. AVIF for web use-cases by gary_0 on Friday October 16, 2026 @07:35PM (#50126225)
> coded image items compliant to the AVIF Baseline profile may not have a number of pixels greater than 8912896, a width greater than 8192 or a height greater than 4352.

https://aomediacodec.github.io/av1-avif/#profiles

I'm assuming if both the encoder and decoder support more than the baseline profile, then higher resolutions up to 64k x 64k are possible, although I would worry the file would be incompatible with some software.

Re:JPEG XL vs. AVIF for web use-cases by pixelesque on Friday October 16, 2026 @06:00PM (#50125320)
It's been a few years since I last tried, so hopefully no longer an issue, but trying to encode 8192 × 5464 images from a Canon R5 a few years ago with libavif, and avifEncoderAddImage() would return a generic error.

If I reduced the res a bit, then it worked, so there did seem to be a limit there somewhere. height and width are stored as u32s internally though, so yes, the format itself technically supports it...

I never looked into it more, so might have been a libavif issue, or maybe the way I was using it (maybe it has defaults or profiles?)

Re:JPEG XL vs. AVIF for web use-cases by Broiler9437 on Saturday October 17, 2026 @02:51PM (#50133891)
Decoding support is pretty poor though. JXL decoder are much more friendly beyond 16K
Re:JPEG XL vs. AVIF for web use-cases by F3nd0 on Saturday October 17, 2026 @03:45AM (#50128879)
Your impression is correct; when JPEG XL was first introduced, it did just as well or better than AVIF in many cases. But in short, work on JPEG XL encoders slowed down, so they fell behind, and JPEG XL now loses to AVIF in some areas.

As the article points out, this might change yet again in the future, depending on how much AVIF keeps improving and whether JPEG XL development picks up steam again and how far it’ll go.

Re:JPEG XL vs. AVIF for web use-cases by boltzmann64 on Saturday October 17, 2026 @11:45AM (#50132092)
so you fell for jxl propaganda. everybody who work with images for a living, knows that jxl has always been shit compared to avif.