JPEG XL is a technically advanced image codec designed as a successor to JPEG, offering greater versatility than WebP and supporting a wide range of use cases beyond the web. However, it was notably rejected by Chrome in 2023, raising questions about its suitability for web deployment. Recently, a Rust-based JPEG XL decoder has been integrated into Firefox and Chrome in some capacity, potentially addressing past security concerns associated with WebP. This development has sparked renewed interest in JPEG XL's role on the web.
Despite its technical merits, JPEG XL faces significant challenges as a web image codec. Its primary advantage—lossless compression—is only marginally better than lossless WebP, and this benefit applies to a small fraction of web images. Most web content relies on lossy compression, where JPEG XL does not outperform established formats like AVIF.
In terms of compression efficiency, modern AV1-based encoders have been finely tuned through perceptual optimization and human trials, delivering superior image quality at comparable or smaller file sizes. JPEG XL's reference encoder lacks directional prediction modes common in other codecs, which help preserve edges and reduce artifacts. While JPEG XL uses splines for edge preservation, this approach is complex and unproven compared to directional prediction.
JPEG XL also lacks a deblocking loop filter, a tool that reduces visual noise in compressed images. Its alternative filters do not fully compensate for this absence, resulting in persistent artifacts. Additionally, JPEG XL's color space and quantization strategies can lead to suboptimal color fidelity, requiring extra effort from encoder developers.
For non-photographic images, JPEG XL's patch-based approach is more complicated and less efficient than AV1's intra-block copy method. This complexity increases bitstream overhead and reduces compression gains. The argument that such images should be vector graphics does not address the reality that many web images are raster and cannot be perfectly vectorized.
Decode performance is another concern. JPEG XL supports advanced features like progressive decoding and JPEG recompression, but these come at the cost of slower decode times compared to AVIF and WebP. Tests show JPEG XL decoding can be significantly slower, and its flexibility allows for crafted images that can severely degrade performance on low-end devices. This raises practical concerns about user experience and device compatibility.
The author concludes that web image codecs should be purpose-built, efficient, and narrowly focused on web needs such as bandwidth savings and fast decoding. JPEG XL's broad design goals make it less suitable for the web compared to AVIF, which benefits from a mature ecosystem and strong industry support. Introducing JPEG XL alongside AVIF could complicate adoption and compatibility without clear benefits.
While JPEG XL may not be the best fit for web browsers, it holds promise in professional imaging workflows, camera systems, and other specialized applications. Its future may lie outside the web, where its technical strengths can be better leveraged. For now, AVIF remains the dominant choice for web image compression due to its balance of efficiency, quality, and ecosystem maturity.