Firefox 157 turns on JPEG XL decoding by default
Mozilla developer Timothy Nikkel posted an Intent to Ship on the dev-platform Google Group announcing that, as of Firefox 157, JPEG XL decoding will be turned on by default on all platforms. The feature has existed behind the image.jxl.enabled preference, on by default on Nightly only, and has had a Firefox Labs checkbox on every channel since Firefox 152. The decoder is jxl-rs, written in Rust. The formal bug to flip the pref by default is filed on Bugzilla, and the format itself is the ISO/IEC 18181 standard. Mozilla's own standards position on JPEG XL is listed as neutral, and the W3C TAG design review is marked satisfied with concerns.
Performance had been raised as a concern during the earlier Intent to Prototype thread. Since then, jxl-rs 0.6.0 shipped with multithreaded decoding support, and Mozilla's patches to hook up and enable that multithreaded decoding are expected to land soon. With those patches included, Nikkel ran a five-format decode benchmark over the same set of pictures at a range of sizes and reported that Firefox's decoder came out slightly ahead of Safari's C++ libjxl implementation on his machine. Compared with Firefox's other image format decoders, JXL decoding is close on large images but shows a bigger gap on small ones. No specific timing or percentage figures were given for either comparison.
On features, Firefox's JXL support has parity with the browser's other image formats and with Blink's JXL implementation, including animation and progressive display. The one gap is HDR: JXL HDR images render as SDR in Firefox, the same as every other image format Firefox supports, though Nikkel says Firefox's tone mapping for JXL is much better than its tone mapping for other formats. He also notes that Safari's JPEG XL implementation has neither progressive rendering nor animation support.
On the competitive landscape, Safari shipped JPEG XL support in version 17.0 back in 2023. Chrome currently has JXL behind the #enable-jxl-image-format flag, using the same underlying Rust library as Firefox, but Google has not stated an intent to ship it by default.
On testing, the Web Platform Tests jpegxl directory covers decode correctness across bit depths, alpha, grayscale, CMYK, color management, orientation, and the format's coding tools, plus the HTML and CSS contexts an image can appear in. Where WPT could not express a case, Mozilla added its own Gecko tests: about 30 gtests covering chunked and incremental decoding, animation frame counts, downscale during decode, and corrupt files, along with mochitests for progressive rendering and telemetry, reftests, and decode benchmarks reporting to Perfherder. Mozilla's fuzzing team fuzzed the jxl-rs decoder before it was enabled on Nightly and plans to fuzz it again before the default-on pref is flipped.
Key facts
- Firefox 157 will turn on JPEG XL decoding by default on all platforms, moving it out of the image.jxl.enabled preference and the Firefox Labs checkbox that has existed on every channel since Firefox 152.
- The decoder is jxl-rs, written in Rust; version 0.6.0 added multithreaded decoding, and Mozilla's patches to enable that are expected to land soon.
- In a five-format decode benchmark across a range of image sizes, Firefox's JXL decoding came out slightly ahead of Safari's C++ libjxl implementation on the author's machine, though no numeric margin was given.
- Firefox's JXL support matches its other formats and Blink's JXL implementation on animation and progressive display; Safari's JPEG XL implementation has neither.
- Safari shipped JPEG XL in version 17.0 in 2023; Chrome has it behind the #enable-jxl-image-format flag with no stated intent to ship by default.
Why it matters
JPEG XL is a newer image codec built to beat JPEG on compression while also handling lossless, high bit depth, animation, and progressive rendering in one format. Firefox turning it on by default, after years behind an experimental flag, means two of the three major browser engines (WebKit and now Gecko) will decode JXL images out of the box, which is the kind of critical mass that makes a format practical for sites to actually use.
Who it affects
Web developers and site owners deciding which image formats to serve gain a browser with meaningfully wider default JXL support; Firefox users get JXL images rendered automatically instead of needing a manual preference flip. Chrome and its users are not affected yet, since Google has JXL behind a flag with no stated plan to enable it by default.
How to use it
No action is needed from end users: JPEG XL decoding turns on automatically once a user is running Firefox 157. Site owners can serve JXL images to Firefox visitors without a fallback needed for that browser once the version ships, though Chrome still requires visitors to manually enable the #enable-jxl-image-format flag to see JXL content.
How solid is it
This is a formal Intent to Ship post from a named Mozilla engineer, referencing a filed Bugzilla bug, an ISO standard, a Mozilla standards-position tracking issue, and a W3C TAG design review, which is Mozilla's standard, well-documented process for shipping a browser feature. The performance claim of being slightly ahead of Safari rests on the author's own single-machine benchmark rather than published, reproducible figures.
Risks and caveats
The post gives no calendar date for when Firefox 157 itself will ship, and the multithreaded decoding patches that the benchmark depends on are described only as expected to land soon rather than confirmed as landed. HDR JXL images will still render as SDR in Firefox, matching the limitation Firefox already has for every other image format it supports.
“we were slightly ahead of Safari (using C++ libjxl) on my machine”
— Timothy Nikkel