JPEG XL Vs. AVIF For Web Use-cases
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Buying for a business?Offer from Amazon

Get business pricing on your home office setup

  • Business-only prices and quantity discounts
  • Tax-exempt purchasing
  • Multiple users, one account, clear invoices
As an affiliate, we earn on qualifying purchases.

A 2026 comparison by Jake Archibald finds AVIF is generally the stronger choice for lossy web photos, screenshots, illustrations and transparency, with smaller files and faster decoding in the tested setups. JPEG XL has advantages in lossless compression, shrinking existing JPEGs without further loss, and some individual images; the results depend on the encoder and settings.

JPEG XL is now available in all major browsers, and a 2026 benchmark by web developer Jake Archibald finds that AVIF generally produces smaller files for common lossy web images, including photos, screenshots and illustrations. The comparison also identifies cases where JPEG XL can be a better fit, so the results point to testing actual images rather than treating one format as a universal winner.

For lossy photos, Archibald reports that the best JPEG XL result was typically 15–25% larger than equivalent AVIF at default effort settings. At maximum effort, the typical gap narrowed to 6–20%. Some images were exceptions: JPEG XL came close to or beat AVIF in particular tests. Archibald also found encoder choice mattered: the newer jixel encoder usually made smaller files than libjxl, except on images with detailed transparency.

The difference was wider for screenshots and illustrations. In the benchmark, JPEG XL files were 30–90% larger at default effort and 20–70% larger at maximum effort than equivalent AVIF files. For transparency, libjxl was 31–44% larger at default effort and 61–70% larger at maximum effort; jixel’s lossless handling of transparency produced files two to three times AVIF’s size. Archibald says lossy AVIF can work well for these categories when bit-exact results are not required.

Performance also varied by task. AVIF generally encoded faster and used less memory when file size was taken into account, while AVIF decoded faster in most comparisons. JPEG XL typically took two to three times as long to decode at medium quality, though the gap narrowed at very high quality and Chrome sometimes decoded JPEG XL faster. Archibald’s tests used released versions of avifenc 1.4.2, libjxl 0.12.0, jixel 0.4.2 and cwebp 1.6.0.

At a glance
reportWhen: Published in 2026; benchmark uses codec…
The developmentJake Archibald published a 2026 benchmark comparing JPEG XL and AVIF for web use, reporting that JPEG XL is now available in all major browsers and that AVIF generally performs better for common lossy image use-cases.

Choosing Formats for Web Images

Format choice affects download size, page rendering and processing costs, but a single headline ranking can conceal large differences between image types. The benchmark’s results suggest that teams serving photos, artwork and transparent assets may get different outcomes from the same codec choice. Smaller files can reduce data transferred to visitors, while decoding speed and memory use matter for the devices displaying them.

Archibald’s practical recommendation is to use AVIF in 4:4:4 mode as a general starting point, with a high encoder effort where the processing cost is acceptable. For an image that produces an unusually large AVIF, he recommends checking JPEG XL with jixel. This is a recommendation based on his tests, not a guarantee for every site, asset or encoder configuration.

Amazon

Top picks for "jpeg avif"

As an affiliate, we earn on qualifying purchases.

How the Benchmark Was Run

Archibald says he used a script to encode a selection of images with several codecs and settings, then recorded file and performance details. Most test images were resized to 1,598 pixels wide, described as twice the maximum width used on his blog so they would appear sharp on high-density displays. The findings therefore reflect a selected image set and particular encoder releases, rather than every possible web image or deployment.

The report compares two JPEG XL encoders, libjxl and jixel, rather than treating JPEG XL as one fixed implementation. It also finds that higher effort settings are not equally useful: AVIF and jixel often benefit, while libjxl’s higher settings could take substantially longer and use more memory for little improvement, sometimes producing larger files. Archibald cautions that both AVIF and JPEG XL implementations have improved recently, so the recommendation could change.

Beyond lossy images, the report says JPEG XL is a strong option for lossless compression and can make existing JPEGs 9–20% smaller without further loss. It also notes a browser limitation for HDR: JPEG XL gain maps are not supported by browser decoders, while the encoding process is described as experimental. In the tested non-gain-mapped HDR material, the report’s two quality metrics disagreed, although both indicated smaller JPEG XL files.

Where Results May Differ

The benchmark does not establish a universal winner: it covers a selected group of images, specified encoder versions and chosen settings. Results may differ with other images, later software releases, browser implementations and quality targets. Archibald reports outliers where JPEG XL approached or outperformed AVIF, but the supplied findings do not identify a result that applies to every image in a category.

Browser support for progressive previews also differs. The report says Chrome and Firefox support progressive JPEG XL, while Safari renders the final image without showing those previews. Progressive AVIF is Chrome-only in the report and is in progress for Firefox. The comparison does not settle whether progressive rendering improves the user experience in every setting, or how future browser and encoder updates will change the trade-offs.

Test Against Your Own Assets

For teams choosing a delivery format, the next step is to benchmark representative site images with the encoders and settings they plan to deploy. Compare file size, visual quality, encode time, decode performance and memory use, and include photos, illustrations and transparent assets rather than relying on one sample. Archibald’s recommendation is a starting point, not a substitute for that testing.

The comparison may also need updating as codec tools and browser support change. Archibald notes recent improvements to both AVIF and JPEG XL, and reports that progressive AVIF support is still developing in Firefox. No future change in their relative performance is confirmed; new encoder releases and browser implementations will need to be measured.

Key Questions

Which format does the benchmark recommend for web images?

Archibald recommends AVIF in 4:4:4 mode as a general default, using a high effort setting where practical. He suggests testing JPEG XL with jixel when AVIF creates an unusually large file.

Is AVIF smaller than JPEG XL for every image?

No. The comparison finds AVIF generally smaller for the tested lossy images, but reports outliers where JPEG XL comes close to or beats AVIF. The result depends on the image, encoder and settings.

When can JPEG XL be a better choice?

The report identifies lossless compression and reducing existing JPEG files without further loss as JPEG XL strengths. It also reports that JPEG XL can perform well on particular images, so testing is needed.

Does browser support make progressive previews equivalent?

No. Archibald reports progressive JPEG XL support in Chrome and Firefox, while Safari does not show its previews. Progressive AVIF is Chrome-only in the report, with Firefox support in progress.

Source: hn

FALL

Fall Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Understanding HDR and Brightness Mapping

Understanding HDR and brightness mapping unlocks the full potential of your display, revealing how these processes enhance image quality and why calibration matters.

Darktable

Darktable has announced a new software update focused on improved editing tools and performance, aiming to strengthen its position among open-source photo editors.

3D Support in Modern Projectors: Calculations You Can’T Skip

Ineffective calculations can ruin your 3D experience—discover essential tips to ensure perfect projection and immersive viewing every time.

Color Accuracy Tips for Movie Lovers

Master color accuracy for movies with essential tips that will elevate your viewing experience—discover how to achieve perfect hues and realism.