HN
Today

The case against JPEG XL

A seasoned image compression engineer presents a detailed technical case against JPEG XL's inclusion in web browsers, systematically dismantling its perceived advantages. The author, a former proponent, argues that while JXL is technically impressive, it's over-engineered for the web's specific needs and has been surpassed by AVIF in key performance areas. This deep dive challenges the prevailing sentiment and offers a nuanced perspective on codec wars, blending technical benchmarks with practical web considerations.

13
Score
3
Comments
#4
Highest Rank
2h
on Front Page
First Seen
Sep 14, 1:00 AM
Last Seen
Sep 14, 2:00 AM
Rank Over Time
430

The Lowdown

This post meticulously argues against JPEG XL's suitability as a web image codec, despite its technical prowess and initial industry support. The author, an image compression expert, previously endorsed JPEG XL but now presents an empirical look at its standing against competitors like AVIF and WebP, particularly for web use cases.

  • Background and Reversal: JPEG XL, a technically advanced, royalty-free codec, was famously rejected by Chrome in 2023. Recent integration of a Rust decoder in Firefox and Chrome suggests a potential reversal, prompting the author to re-evaluate its necessity for the web.
  • Lossless Compression: The article contends that JPEG XL's lossless advantage (approx. 12% over lossless WebP) is minimal and applies to a tiny fraction of web content, not justifying its adoption given its shortcomings in lossy compression.
  • Lossy Compression Efficiency: Contrary to early claims, JPEG XL's reference encoder is now outperformed in both speed and fidelity per bit by other encoders, notably AV1 and the author's upcoming aperture-alpha. Modern encoders are perceptually tuned, and JXL suffers from unresolved perceptual issues and metrics underperformance.
  • Technical Disadvantages: The author details several inherent design limitations in JPEG XL, including the lack of directional prediction modes (leading to weaker edge preservation), reliance on complex splines, absence of deblocking loop filtering, issues with its XYB colorspace, and poor handling of non-photographic images compared to AV1's Intra Block Copy.
  • Decode Time and Progressive Rendering: JPEG XL is shown to be significantly slower to decode than AVIF and WebP. It also trails AVIF in progressive rendering capabilities, where AVIF delivers a usable image much earlier. Furthermore, JXL's expressivity allows for "JXL-bombs" – tiny images that take obscenely long to decode, posing a risk to low-end devices.
  • Purpose-Built vs. General-Purpose: The author concludes that web codecs should be purpose-built and narrowly scoped for bandwidth saving, fast decoding, and security. JPEG XL, designed to be "everything to everyone," doesn't fit this model, failing to offer substantial advantages over AVIF for web use cases. While acknowledging JXL's potential in professional tools and camera manufacturing, the author asserts it's not needed in browsers.