How many times in recent years have you heard that the web's image format zoo is finally over? First, we were promised WebP would replace good old JPEG forever. Then AVIF arrived, and everyone talked about the incredible compression ratios of the AV1 video codec packed into still images. Right after that, JPEG XL burst into the standards. It had a dramatic run: removed from experimental Chromium builds at first, then brought back to browsers in triumph after community pressure and adoption in Safari and Firefox.
With so much noise around image formats, it's easy to fall into one of two extremes. You either stubbornly stick to 1992-era JPEG or rush to convert your entire media library to the trendiest new option. Well-known web engineer Jake Archibald decided to test reality in practice. He ran a large-scale comparison of JPEG XL and AVIF on real images from his blog using an M4 Pro MacBook Pro. For objectivity, he used the strict perceptual quality metric SSIMULACRA 2. I dug into his data, so let's break down how both formats behave under the hood and why they don't kill each other—they split the web cleanly in half.
The Illusion of an Absolute Win: Where AVIF Pulls Ahead
Let's start with the most painful question: file size under lossy compression. Any format advocate's slide deck will show you charts with massive savings. On real photographs, however, encoders behave in surprising ways.
At default settings, AVIF consistently produces files 15–25% smaller than JPEG XL at the same SSIMULACRA 2 visual quality score. If you crank compression effort to the maximum—forcing the encoder to spend hours searching prediction vectors—the gap narrows, but AVIF still keeps a 6–20% lead.
The real chasm opens up when you deal with UI graphics, software screenshots, and vector-style illustrations with crisp edges:
- On UI screenshots and charts, JPEG XL files end up 30–90% heavier than AVIF at standard encoding effort.
- For images with an alpha transparency channel, the reference
libjxllibrary outputs files 31–44% larger at default settings. The new Rust encoderjixelby developerawxkeeencodes transparency strictly losslessly, which can make files with semi-transparent gradients 2–3 times larger than compact AVIF.
Why does this happen? AV1 was designed as a video codec. Its algorithms are tuned to split a frame into large uniform blocks and aggressively smooth flat regions. When a screenshot has a solid window background or a flat-filled button, AVIF collapses it into just a few bytes. JPEG XL is built to preserve natural frequency characteristics, so it spends extra bits on flat synthetic surfaces.
The Flip Side: Plastic Smearing vs. a Living Frame
If AVIF compresses harder, why bother with JPEG XL at all? Here we reach the core engineering trade-off.
Macro comparison still life of two image fragments, AVIF and JPEG XL, on a split laboratory stand with an optical loupe.
Take a close look at a high-detail photograph compressed with AVIF at medium quality. Check the fabric texture, fine tree leaves, skin pores, or film grain. What happens to them? AV1's smoothing algorithm ruthlessly erases micro-structures, creating a distinct "plastic" or blurry watercolor effect. Your eyes immediately sense that something looks unnatural, even when formal noise metrics look fine.
JPEG XL works very differently. Its math—including the XYB color space and adaptive quantization—was designed around human visual psychology and photographic optics. It keeps natural grain and sharp micro-contrast intact even at moderate bitrates. On heavy, high-resolution photos for clothing stores, interior galleries, or photography portfolios, JPEG XL looks far more natural and alive than AVIF.
The Secret Weapon: Lossless JPEG Recompression
JPEG XL has one superpower that AVIF doesn't have and never will. It can reversibly repack existing JPEG files with zero quality loss.
Imagine you have a storage bucket holding hundreds of gigabytes or terabytes of old .jpg photos. If you re-encode them into AVIF or WebP, you trigger lossy transcoding. Old compression artifacts stack onto new ones, and quality inevitably degrades.
JPEG XL can read the original Discrete Cosine Transform (DCT) coefficients of a standard JPEG and pack them into a tighter binary container using modern ANS entropy coding.
- File sizes drop by 9–20% seemingly out of thin air.
- The image doesn't lose a single bit of information.
- At any moment, you can unpack the file back into a byte-for-byte identical copy of the original JPEG.
For cloud CDNs and media servers, that means huge bandwidth and storage savings with zero risk of damaging customer originals.
Progressive Rendering and Browser Speed
Another critical factor for web development is how fast content appears on screen. As noted when covering the Chrome 155 release: JPEG XL returns, CSS symbols(), and JS text modules, progressive rendering has become key to mobile user experience.
JPEG XL supports genuinely graceful progressive rendering. The browser first paints a low-frequency preview of the whole image (the DC spatial layer), then smoothly fills in sharp details as more bytes arrive. With the jixel encoder at high compression effort, enabling progressive mode adds almost nothing to file size.
At the browser engine level, though, support is still uneven:
- Google Chrome and Mozilla Firefox handle progressive JPEG XL rendering very well.
- Apple Safari still paints the image all at once only after the entire network payload finishes downloading.
- Modern processors (Apple M3/M4, Intel Core Ultra, AMD Ryzen) also include dedicated hardware AV1 decoders. As a result, AVIF decodes in silicon 2–3 times faster and barely drains mobile battery. JPEG XL is still decoded in software almost everywhere, though efficient SIMD code keeps it very fast.
Don't try to crown one winner for every use case. Modern image delivery splits cleanly into two scenarios:
- For documentation screenshots, vector illustrations, logos with semi-transparency, and low-resolution product thumbnails, serve AVIF. It breaks compactness records there.
- For full-screen photography, high-resolution galleries, richly textured banners, and compressing existing archives, serve JPEG XL via the
<picture>element with fallbacks to AVIF and JPEG.
In the end, this isn't a fight to the death—it's a long-awaited sign of maturity for the web platform. Both tools have found their natural niches, and a smart engineer can maximize both load speed and visual quality by combining their strengths.

