Firefox 157 to enable JPEG XL decoding by default on all platforms
A Mozilla engineer has announced the intent to ship JPEG XL in Firefox 157 with the Rust-based jxl-rs decoder enabled everywhere by default — years after Safari added support and while Chrome keeps it behind a flag.
Mozilla engineer Timothy Nikkel announced on the dev-platform mailing list that, as of Firefox 157, the browser intends to turn JPEG XL decoding on by default on all platforms. The format was developed behind the image.jxl.enabled preference, which today is on by default only on Nightly, and has had a Firefox Labs checkbox on every channel since Firefox 152.
The decoder and the standard
Firefox's decoder is jxl-rs, written in Rust. JPEG XL is standardized as ISO/IEC 18181; Mozilla's standards position on the format is neutral, and the W3C Technical Architecture Group review is marked "satisfied with concerns". Support will ship behind a single preference, image.jxl.enabled, covering all platforms.
Where other browsers stand
Safari shipped JPEG XL in version 17.0 in 2023. Chrome has it behind the #enable-jxl-image-format flag using the same Rust library, with no intent to ship so far. Nikkel says the implementation has feature parity with Mozilla's other image formats and with Blink's JXL implementation, including animation and progressive display. The one exception is HDR: HDR images display as SDR, as with every other format the browser supports, though the tone mapping for JXL is much better than for other formats. Safari, he notes, has neither progressive rendering nor animation.
Performance, testing and open questions
Performance was the main concern raised during prototyping. jxl-rs 0.6.0 added multithreaded decoding, and patches to enable it are expected to land soon. In a five-format decode benchmark across a range of image sizes, Nikkel measured Firefox slightly ahead of Safari, which uses the C++ libjxl, though on small images the gap to Firefox's other decoders is wider.
Correctness is covered by the web-platform-tests jpegxl directory — bit depths, alpha, grayscale, CMYK, colour management, orientation and the coding tools — plus roughly 30 Gecko tests for chunked and incremental decoding, animation frame counts, downscaling and corrupt files, mochitests for progressive rendering and telemetry, reference tests, and decode benchmarks reported to Perfherder.
In the same thread, developer Sergey Davidoff argued that lossless JPEG XL decoding is far slower than lossless WebP — roughly 30 times in his single-threaded benchmark — in exchange for a file size reduction of about 10 percent, and suggested shipping only lossy JPEG XL in Firefox 157. Nikkel confirmed that animated JPEG XL is supported.
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.