JPEG XL vs. AVIF for web use-cases (jakearchibald.com)

168 pointsby farlight6 hours ago133 comments

yhjc2692 5 hours ago

> libjxl's maximum effort is very slow. It produces files 2–7% smaller than its default for photos, and ~25% smaller for the screenshot and illustration, but takes 9–46 seconds, which is 50–180x as long as its default. jixel gets the same results in a couple of seconds.

libjxl's slow speed at efforts >7 is primarily due to an iterative evaluation-optimization loop of a perceptual error metric called Butteraugli (by tuning quantization weights). This, as well as some other computations in libjxl encoding, happen to be data-parallel and run faster on GPUs than multicore CPUs.

In case anyone is interested, I've been working on a GPU-accelerated libjxl port (supporting CUDA and Metal for now) that makes this much faster, closer to libjxl's normal speeds: https://github.com/yunho-c/gjxl - geared for encoding a large batch images into JPEG XL. It's also faster by around 2.9x at normal effort (7).

watersb 18 minutes ago

I've found AVIF to be very effective at screenshots with lossy compression.

Text has lots of edges, hard transitions between bright and dark areas. So text requires lots of high-frequency detail, and JPEG adds a lot ringing as it bounces off all those lines and curves.

AVIF seems to follow contours, so it does a good job with line art.

Otherwise, it's hard to beat the Mozilla JPEG encoder.

JPEG XL can represent lossless images that exceed the limits of human vision. I don't expect it to replace FITS for astronomical images, but the future is weird.

(Super huge thanks to Jake Archibald for the SVGOMG web app. Which is also fantastic for line art.

https://jakearchibald.github.io/svgomg/

Squoosh is a web app front end to various image encoders

https://squoosh.app

)

objectcode 16 minutes ago

4:2:0 chroma subsampling might be useful for compatibility. So, sticking with 4:4:4 might or might not be ideal. There are codecs such as H.264, where using 4:4:4 substantially reduces compatibility. Though, there are others like JPEG where it seems fine. Perhaps there are AV1 hardware decoders that only support the AV1 main profile? For the web, there is the HTML picture element where an avif image can be automatically selected by supported browsers and images of other codecs can be used as fallbacks, but maybe it would display wrong and not fall back if avif is supported but 4:4:4 isn't?

Metricon 4 hours ago

AVIF is fantastic format and I use it in my production applications. Spent quite a bit of time looking to the best settings (at least for up to 2k images) and for anyone interested in converting images to AVIF, here's what I've found to work the best for creating the smallest size (10x+ smaller) while still retaining good quality and even supports PNG transparency:

  ffmpeg -i {input_file} -filter_complex "[0:v]format=pix_fmts=yuva444p,split[color][alpha];[alpha]alphaextract[alpha_chan]" -map "[color]" -map "[alpha_chan]" -c:v libaom-av1 -crf 25 -cpu-used 3 -still-picture 1 -aom-params "sharpness=2:enable-chroma-deltaq=1:arnr-strength=0" -color_range pc -colorspace bt709 -color_primaries bt709 -color_trc bt709 {output_file}

jaffathecake 4 hours ago

Hmm, I haven't tested this, but I'm deeply sceptical. avifenc is now optimised very well for still images, and you're bypassing all of that here.

Metricon 4 hours ago

These settings have worked very well for me so far, but if you are aware of even better settings, I'd certain like to give it a try.

jaffathecake 4 hours ago

avifenc. The latest version.

Metricon 3 hours ago

Ah, I actually wasn't aware that "avifenc" was a separate executable. Thanks for the information. I will definitely do some comparison testing.

theandrewbailey 3 hours ago

It's part of libavif. I've usually compiled it myself.

https://github.com/aomediacodec/libavif

avifenc supports args like enable-chroma-deltaq. I've used those but recently stopped, and nothing substantial changed.

LewisOrton 2 hours ago

in my app i was using jpeg but then switched to webp two years ago, they're for generating/displaying thumbnails for images and videos. and now avif seems like a better fit? anything that you're not happy about? considering avif now, appreciate any ideas

Metricon 41 minutes ago

If you're working with images that need to be lossless or are simple in color diversity, WEBP is probably still a better choice (though not by a large margin). The biggest issue you might run into with AVIF is legacy support, particularly amongst Apple devices who were slower to implement support for it.

Otherwise the massive size reduction for storage and transfer speeds makes it incredibly attractive for modern web applications.

LewisOrton 20 minutes ago

it's a desktop app so i dont see any reason not to use avif, thanks!

linolevan 2 hours ago

I think people are really forgetting that JXL's encoders are bad right now. For instance, in TFA Jake presents

- The Firefox screenshot w/ lossless JXL at 66.9kB, when with a better encoder you get get it down to like 40.7kB (39% smaller) [1] (or 43kB if you need it to work with jxl-rs [2])

- The cat illustration w/ lossless JXL at 255.3kB, when with a better encoder you can get it down to 178kB (30% smaller) [3]

[1] https://www.linolevan.com/05-screenshot.jxl

[2] https://www.linolevan.com/05-screenshot-web.jxl

[3] https://www.linolevan.com/06-illustration.jxl

yhjc2692 2 hours ago

Yeah, it's very cool that jixel was able to achieve such large efficiency improvements!

Aachen 2 hours ago

Oh, that explains! I tried AVIF and JXL a few years ago and one of the two took ages to encode (a minute versus <1s for jpeg) to get similar compression ratios, and the other was somewhat reasonable on cpu complexity but significantly worse quality at the same size / much bigger to achieve the same quality as good old jpeg. I ended up concluding that jpeg is still the best for the specific image I was trying to lossily compress, but that was probably just the encoder then

ksec 2 hours ago

Thank You. I was about to post I suspect both of those images would have worked better with JXL lossless.

Curious what is the better encoder here referring to?

jaffathecake an hour ago

It's an unreleased one. There's a whole section in the article about lossless, which includes data on those images, but not this mystery unreleased encoder https://jakearchibald.com/2026/jpeg-xl-vs-avif/#lossless

jaffathecake an hour ago

Happy to see your version of the cat illustration doesn't come with massive decoder overhead. Are you planning to open source this encoder?

linolevan an hour ago

It's just a side project I'm working on with some friends. May release it if it's interesting to folks.

149765 an hour ago

I would love to try it out.

linolevan an hour ago

I'll post it to bsky/HN at some point in the future!

ezst 3 hours ago

Having lived through the MP3 era and experienced the many years/decades? that it took for experts across fields to come together and figure out LAME and the bag of parameters that ultimately made it better than most audio formats around it, I would lean towards waiting this one out, and not take any announcement of a "winner" as gospel. We've yet to see the codecs mature and refine for some time.

I also remember the big claims about WebP's superiority, which ended-up in practice, at equivalent file-size, mostly trading away some of the JPEG artifacts that we all know for some unusual new ones.

I don't think there's a large-enough margin in this space that a new format could chew into to make the general public care: image compression seems like a solved problem overall. The second best thing is to come-up with a format that can make the content producers not have to care either, i.e. be the best in class or close-enough in a variety of use-cases (lossy, lossless, fast, animated, hdr, progressive, …). My naive impression was that jxl is mostly interesting in that regard.

tormeh 2 hours ago

Another interesting niche is in between JPEG and RAW. RAW files are a pain to deal with, but editing JPEGs can be problematic due to bit depth and whatnot. Personally I just want to shoot pictures and not edit/convert/whatever, but sometimes I have a shot that could benefit from a bit of adjustment, and that's where even large JPEGs have an issue. Bit depth and whatever isn't suitable.

Aachen 2 hours ago

> I don't think there's a large-enough margin in this space that a new format could chew into to make the general public care

What improvement do you think is necessary for people to care?

Genuinely curious. Spoiler link with my answer to avoid any bias: https://lgms.nl/p/cau/?b64&ZVRNb9QwEL0j9T%2BMKqFtpe1Cqcq9qoT...

abanana 37 minutes ago

Regarding real-world use of WebP - what makes it much worse, in my experience, is that so many web servers are set up to do a lossy conversion to WebP from the original file, most often JPEG (to cut down on bandwidth, or just to satisfy a web speed report originating from Google and therefore pushing Google's technologies). The difference is often very noticeable, e.g. textures smoothed out of existence. Helps to remove WebP from the Accepts header to force servers to serve the original.

It means the technical differences between format, and the real-world choice of which file you want, don't match.

PaulHoule 5 hours ago

That F1 image is, in my mind, proof of exactly what is wrong with AVIF. If you look closely the beautiful highlights on the car have been erased and replaced with something plausible. Once you see it you can't unsee it and it boggles my mind that people are still using it as an example.

Granted, AVIF performs impressively for, say, a huge hero image for a blog where you're out to create an overall impression and people aren't going to look at it closely. It does not impress me when I am compressing photos I took with my mirrorless and I expect them to look like photos taken with a mirrorless and not cell phone snaps.

dfabulich 5 hours ago

I'm looking as closely as I'm able, and I don't see what you mean. (I'm not a car guy, or a photo guy.) What do you mean by highlights? What am I looking for? Reflections?

jaffathecake 5 hours ago

I agree fwiw. The only one that looks bad to me is jixel at lower qualities.

buzer 5 hours ago

Look between the Eni and ApeCoin logos. In lossless you can see there are lines from what I assume separate pieces assembled together. Next to ApeCoin there's also a round piece in the lossless version which is missing from the AVIF. JPEG XL loses most of these as well though.

That's what I noticed anyway, not a car or photo guy either.

jaffathecake 4 hours ago

The original is a single photo.

buzer 3 hours ago

If you are referring to "lines from what I assume separate pieces assembled together." I didn't mean that the photo was assembled from multiple pieces, I meant that part of car was (panels or similar). Those lines between panels were no longer visible.

jaffathecake 3 hours ago

Oh, yeah, haha!

boogerlad 5 hours ago

Would you be able to circle these highlights? I viewed - https://jakearchibald.com/c/original-CXtAofvc.jpg - https://jakearchibald.com/c/avif-q39-e0-d8-yuv444-ssimu70.4-... at 100% magnification at peeped around for a few minutes but didn't notice anything. Maybe my eyes / monitor is bad...

PaulHoule 5 hours ago

Oh crap, it's this image

https://jakearchibald.com/2020/avif-has-landed/demos/compare...

I was talking about. He linked another one! Guess people finally realized that one sucks and now they have a new one. I screwed up.

jaffathecake 5 hours ago

They didn't even have the halo back then!

jaffathecake 5 hours ago

OH WAIT. I KNOW WHAT'S HAPPENING HERE.

You're looking at it in a browser that doesn't support JPEG XL, so it's falling back to a WASM renderer, and I think it handles resizing differently.

This is totally my bad. I thought I was doing a good thing by adding that fallback renderer, but it isn't identical and it's giving people the wrong impression.

The lossless version is JPEG XL, hence the difference to AVIF.

eviks 4 hours ago

by the way, why not convert everything to png for comparisons to avoid browser support issues?

jaffathecake 4 hours ago

All browsers support AVIF and JPEG XL now. I was hoping to keep their download size benefits.

D2OQZG8l5BI1S06 3 hours ago

Firefox added support only 3 days ago! And this doesn't cover the ESR version.

jaffathecake an hour ago

Sure but this is a technical post aimed at a technical audience.

CodesInChaos 2 hours ago

In Firefox 157.0.1, the right border of the image moves by a pixel or two when I press "hold for lossless" while viewing the AVIF. I think it's the lossy AVIF that's a bit too small.

jaffathecake an hour ago

That's what I'm talking about. JXL support landed in 158.

CodesInChaos an hour ago

But why does missing JXL support make the AVIF too small? It ends one pixel before the gray background.

mkesper an hour ago

I also feel like sometimes the lossless image 'sticks' even after having released the button. Don't know how to reliably test that, though.

CodesInChaos an hour ago

https://jakearchibald.com/2026/jpeg-xl-vs-avif/#lossy---scre...

In full screen mode, the "hold for lossless" version "Firefox help"/"Submit feedback" are not underlined. In inline mode they are. Both modes seem to render a scaled down version of the image, which seems to cause these problems.

theandrewbailey 5 hours ago

I've been using AVIF on my blog for a few years. My blog's image corpus is almost entirely videogame screenshots, and I keep the original PNGs so I can re-encode if better encoders release. Despite playing around with JPEGXL every year or so, AVIF images usually looked better (if only a little) at the same file size (vs JPEGXL).

After reading this article, there's something to point to prove I'm not going crazy.

bitpush 5 hours ago

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?

jaffathecake 5 hours ago

Claims around JPEG XL have always been wild. E.g. this from one of the creators https://x.com/jyzg/status/1592811472073416704

bitpush 5 hours ago

That's.. horrific. How can someone be this out of touch?

throw0101c 5 hours ago

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.

bitpush 5 hours ago

If you're transcoding why wont you go to avif or another one? If jpeg -> jpeg-xl uniquely better?

pwg 4 hours ago

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.

venusenvy47 2 hours ago

I always think of transcode and lossless as opposites. How is this achieved in this format?

ksec 2 hours ago

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.

adrian_b 4 hours ago

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.

jaffathecake 4 hours ago

Please read the article. All of the comparisons default to "high" quality, according to JXL's own metric.

adrian_b 4 hours ago

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.

JyrkiAlakuijala 2 hours ago

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

jaffathecake an hour ago

'high quality' and 'very high quality' are different things.

kps 3 hours ago

> 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?)

ksec 2 hours ago

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.

mdasen an hour ago

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.

jaffathecake an hour ago

> 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.

pixelesque 27 minutes ago

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?)

eviks 4 hours ago

Unfortunately for the comparison-focused blog post the comparison widgets is pretty bad - you can't quickly compare 2 reference pictures (original vs AVIF or original vs JXL) at different scalings like here https://web.archive.org/web/20200915201019/https://afontenot...

(also like the BPP size metric that is picture size-independent)

Wish that widget with improvements (that allows comparison of 3 pics with 3 buttons: original/codec1/codec2) were the widespread standard (also, "hold" is a rather unergonomic action)

Otherwise, seems like AVIF has had impressive gains in both speed and quality, wonder whether JXL could catch up

jaffathecake 4 hours ago

Offering different scalings is pointless because they're designed for a single largest size.

eviks 2 hours ago

But they won't be viewed at different sizes? But even then, the point is in making detection of artifacts easier

jaffathecake an hour ago

As someone putting an image on a web page, why would I make detection of artifacts easier?

The images in the article max out at the maximum size I'd want them displayed.

networked 3 hours ago

For a moment I was sad the original comparison page was gone. It turns out it is still online under the developer's new GitHub username: https://lmfont.github.io/image-formats-comparison/#abandoned....

eviks 2 hours ago

Thanks! Was also sad, but it's "just" linkrot, will update bookmarks

fngjdflmdflg 5 hours ago

>Animated image formats are dumb and animated JPEG XL is no exception. Video formats are better at video. They're built for it. They're optimised for it. Not just in terms of encoding, but also in terms of playback.

This is something I've felt doesn't get enough attention when comparing JXL and AVIF. AVIF can be the replacement for GIF.

><video muted autoplay> is right there.

>No, I'm not adding a demo. I don't want it on my server. Use video formats for video.

I'm not sure if "Use video formats for video" is saying to use AVIF over JXL or saying to use AV1 over AVIF. If the latter, GIF-like animations have a different enough user expectation that it makes sense to have it as something different from regular videos. Even <video muted autoplay> doesn't encode the full expected behavior because GIFs are not expected to have controls like pause, play and scrub. And even if you hide the controls users will expect similar behavior when opening it in an image viewer or in a new tab. Images do not have controls so they fit better as an image, although maybe they need their own category.

Also, I didn't realize how good AVIF was at progressive rendering. I don't think I knew it could do that at all. I think AVIF is the clear winner for the web, although it is still nice to have JXL for lossless. Somehow I feel that AVIF still hasn't gained as much usage as it should, especially now that it is supported almost everywhere. I think I see more webp than AVIF, and JPEG is still everywhere. Maybe now that JXL is out, developers will take another look? AVIF is supported by 96.35%-98.83% of browsers according to caniuse whereas webp is 97.18%-99.68% and JPEG is 97.28%-99.78%.

I also didn't know there was a Rust JXL encoder named jixel.[0]

[0] https://github.com/awxkee/jixel

eviks 4 hours ago

nit: another rust ENCoder, not DE

Though given the lagging speed in decoding, is there a faster tying JXL decoder planned?

jaffathecake 4 hours ago

jxl-rs is rust (used in Firefox and Chrome), and already faster than libjxl (used in Safari).

fngjdflmdflg 4 hours ago

Fixed that, thanks!

Dylan16807 4 hours ago

I agree that animated images make sense as a category. But I wish I did get controls on them when opened directly. Being unable to pause a gif leads to very annoying workarounds sometimes.

adzm 5 hours ago

JPEG transcoding is one of the neatest features of JXL; there is so much existing jpeg out there. Eventually that may be unnecessary, but it's looking like this could already save a significant amount of space for photo archive backups for example.

lern_too_spel 5 hours ago

That's just by changing the entropy coder and retaining the DCT coefficients. The idea is similar to Dropbox's Lepton. https://dropbox.tech/infrastructure/lepton-image-compression...

jeffbee 5 hours ago

The main difference being that Lepton is worse and 100x slower.

CodesInChaos an hour ago

Lepton guarantees that JPEG->Lepton->JPEG produces an identical file, not just identical pixels. Does JPEG XL achieve the same thing?

quentindanjou 6 hours ago

Great article!

Overall I am getting that AVIF is better on the web...unless Lossless is needed, in that case better take JPEGXL.

throw0101c 5 hours ago

Perhaps useful:

* https://caniuse.com/?search=avif

* https://caniuse.com/?search=jpegxl

braiamp 5 hours ago

Note about caniuse: browsers dragged their feet with jpegxl while avif had the backing of the biggest browser in existence: internet explorer

jaffathecake 5 hours ago

Apologies if your comment was meant to be a parody as there's a bit of Poe's law around this stuff…

IE never supported AVIF. Edge even shipped AVIF later than Chrome. One of the leaders of JPEG XL worked at Google until relatively recently. A massive amount of JPEG XL development has been done by a team at Google.

adzm 5 hours ago

> AVIF is basically the keyframe format of AV1 video, with a bunch of still-image-specific optimisations thrown in. Animated AVIF however, is pretty much just a repackaging of AV1 video. You can convert an AV1 MP4 to AVIF and back losslessly - it's just a container change. That's why it performs so much better, because it's built for motion.

So, is animated AVIF only keyframes / p-frames, where each frame is independent from the other? I was under that impression, uncertain if there are any other capabilities it might have (like only updating part of the canvas when only parts change, like GIF supports)

jaffathecake 5 hours ago

No. I used to think this too, but it isn't limited to keyframes.You can convert an AV1 MP4 to AVIF and back losslessly - even if it has non-keyframes. It's just a different container. It has the full AV1 capability. Plus transparency.

Dylan16807 4 hours ago

> AVIF is basically the keyframe format of AV1 video, with a bunch of still-image-specific optimisations thrown in. Animated AVIF however, is pretty much just a repackaging of AV1 video.

What optimizations are being added? I thought it was basically the exact same codec, but different packaging and usually some adjustment to how the encoder is tuned.

jaffathecake 3 hours ago

tune=iq is the main bit https://aomedia.org/blog%20posts/Libavif_v1_4_0-Boasts-Major...

moecables 3 hours ago

I don't have any real use cases for jxl or avif or any other modern format b/c I rarely host images but all these articles are always so interesting to me. And at the end of it, I'm left wondering, is there ever going to be a single winner here?

Klaus23 5 hours ago

The question now is how much of AVIF's advantage comes from the encoder compared to the image format itself. If it is the encoder, does JPEG XL even stand a chance of catching up? AVIF will certainly receive further improvements, albeit at a diminishing rate.

jaffathecake 5 hours ago

https://giannirosato.com/blog/post/case-against-jxl/ suggests JXL is fundamentally limited. We'll see. There's a race on and it's great!

aadharshpan 4 hours ago

A little while ago, I chucked together a comparison game on image file formats (incl a stab at av2 images), encoders, parameters to back out preferences relative to ssimulacra2 and butteraugli: https://aadhar.sh/pixel-peeper

It does seem like AVIFs win on small images, and JXL gives you progressive rendering, easy upgradability on JPEGs, and better lossless and high bitrate images.

javier2 5 hours ago

1. How long does size, encode time and resize take compared to good old jpeg?

2. Is it possible to encode AVIF with hardware acceleration?

jaffathecake 5 hours ago

JPEG is fast as fuck, due to it being designed for decades old hardware.

When it comes to hardware encoders, the nicest thing you can say about them is they're fast. Software tends to do way better at quality. Hardware AV1 encoders will be tuned for video rather than stills.

Theodores 5 hours ago

Jake's interest in F1 hasn't waned, which is good to see. I am presuming that picture of an Alpine/Renault at Goodwood is his 18Mb photo, but I could be wrong. Neither has his interest im image compression waned, which is also good to see. But why the move from Google to Firefox?

I am still on webp, thinking that I am on the bleeding edge in a world where artworkers are obsessed with pixels with JPG/PNG as the only formats they know, which is an advance on GIF.

Every browser advertises what formats it will accept and if it is in 'data-saving, low bandwidth mode', so I just configure the CDN to keep the names the same '.jpg' but to send the bestest format for the situation/browser, whether that be webp or AVIF, fetching super-high resolution files from the origin server, outputting them in 'retina' resolution with none of those 'picture' elements referencing half a dozen 'responsive' sizes.

In this way nobody has to care what image format is being served, and if it is deemed that everything is way too compressed, the CDN can be flushed of the cached images, quality increased, and cache rebuilt.

It looks like I will need to update my server configuration to use JPEG XL in the usual five years' time, given the lack of any revolutionary benefit.

jaffathecake 5 hours ago

Yep, Alpine, and yep, Goodwood! Nicely done!

I was at Google for 10 years, then went to Shopify for 2 years, but I missed the web. For most of the time I was at Google, it mostly did what was good for the web, rather than pushing Google's interests, but that started to change, which is one of things that led to me leaving. E.g. see what happened with the Prompt API.

dc3k 6 hours ago

I really hope that some day Firefox supports HDR AVIF images

jaffathecake 5 hours ago

It's not AVIF that's the issue, the blocker is supporting HDR in general.

dc3k 5 hours ago

Fair point. HDR images in Firefox just do not work at all, regardless of the format.

shevy-java 2 hours ago

Some days ago we had a similar discussion here.

For me personally, AVIF is still better, for various reasons (not solely file size compression ratio as such, though this is my number one go-to objective; browser support is also useful but to me is not so important as it is).

I am keeping a close eye on JPEG-XL, but right now I am quite settled on .avif. All my local collection is in .avif, when before it was a mixture of .jpg, .png and a few animated .gifs. From my findings a few years ago, avif is superior to jpg, png and gifs on pretty much everything it matters. On very high compression, though, I also noticed artefacts, but we had that even more so with jpg, and for 1:1 comparable file size, avif beats jpg with both eyes closed.

By the way, great article. I hope he can do another review, based on that blog entry, in, say 3 years. Would be interesting to see how avif and jpeg-xl have improved. In all likelihood I will still keep on using avif, but if jpeg-xl is a real winner in some areas, I may use it. (Lossless is one area where jpeg-xl excels, but I don't need to store satellite data; I want to store old family pictures in an efficient manner, and here it seems avif is better.)

phoronixrly 6 hours ago

Ah, Chrome ships JXL when we already have a better codec for the web!

lern_too_spel 5 hours ago

PDF standardized on JPEG XL, and Chrome ships with a PDF renderer.