AVIF Beats JPEG XL on File Size and Speed for Web Images
With JPEG XL now shipping in all major browsers, a hands-on benchmark across lossy photos, screenshots, transparent images, and lossless encodes shows AVIF holding a consistent file-size advantage. For typical photographs, AVIF files at default encoder effort run 15–25% smaller than the best JPEG XL output; at maximum effort the gap narrows to 6–20%. The disparity widens sharply for screenshots and illustrations (AVIF is 30–90% smaller at default effort) and for images with transparency, where the older libjxl encoder produces files 31–44% larger and the newer jixel encoder—because it encodes alpha losslessly—lands 2–3× bigger than AVIF. AVIF also wins on decode speed, typically rendering 2–3× faster at medium quality, and on encode efficiency when file size is factored in.
A few caveats keep JPEG XL in the running. It can shrink existing JPEGs by 9–20% with no further quality loss, it is the clear choice for true lossless compression (lossless AVIF runs 30–120% larger), and jixel’s progressive-preview support adds near-free progressive decoding at high effort settings. AVIF has its own progressive-rendering path, currently Chrome-only, that offers more preview control and smaller files. JPEG XL’s HDR story is hampered by missing gain-map support in browser decoders, whereas AVIF’s gain maps are already wired in.
The practical takeaway: default to AVIF at 4:4:4 with the highest encoder effort you can tolerate, and spot-check JPEG XL via jixel when an AVIF file looks unexpectedly large. The author cautions that both ecosystems are iterating quickly and that much of the public discourse—especially AI-generated commentary—contains outdated or wrong claims, so testing against your own image set remains the reliable approach.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.