The Spectrum Dispatch News

technology

Firefox 157 will enable JPEG XL image format by default across all platforms

Mozilla plans to turn on JPEG XL decoding by default in Firefox 157, making the ISO/IEC standard image format available to all users after testing on Nightly and Firefox Labs.

Firefox 157 will enable JPEG XL image format by default across all platforms

Mozilla intends to enable JPEG XL decoding by default in Firefox 157 across all platforms, according to a post on the Mozilla dev-platform mailing list. The feature has been developed behind the image.jxl.enabled preference and has been available on Nightly by default, with a Firefox Labs checkbox option available on all channels since version 152.

Firefox 157 will enable JPEG XL image format by default across all platforms

The decoder is built using jxl-rs, a Rust-based implementation. JPEG XL is defined by the ISO/IEC 18181 standard. Mozilla’s standards position on the format is neutral, and a W3C TAG review found the implementation satisfied with concerns.

Since an earlier intent to prototype, performance improvements have been made. The jxl-rs library released version 0.6.0 with multithreaded decoding support, and Mozilla’s patches to enable this multithreading are expected to land soon. According to the announcement, performance benchmarks across five image formats showed Firefox slightly ahead of Safari (which uses the C++ libjxl library) on the test machine. Compared to Firefox’s other image format decoders, JPEG XL performs close to other formats on large images but shows larger differences on smaller images sizes.

The implementation includes feature parity with other supported image formats and Blink’s JPEG XL implementation, including animation and progressive display. HDR images display as SDR (standard dynamic range), matching Firefox’s behavior with other formats, though the tone mapping for JPEG XL is described as significantly better than for other formats. Safari’s JPEG XL implementation does not support progressive rendering or animation.

Testing has been comprehensive. The Web Platform Tests jpegxl directory covers decode correctness across bit depths, alpha, grayscale, CMYK, color management, orientation and coding tools, as well as HTML and CSS image usage. Additional testing includes approximately 30 gtests for chunked and incremental decoding, animation frame counts, downscale during decode and corrupt files, along with mochitests for progressive rendering and telemetry. The Firefox security fuzzing team previously fuzzed the jxl decoder and will do so again before the preference is enabled.

Safari shipped JPEG XL support in version 17.0 in 2023. Chrome has JPEG XL available behind the #enable-jxl-image-format flag using the same Rust library but has not announced intent to ship it by default.

Key facts

  • Firefox 157 will enable JPEG XL decoding by default on all platforms
  • The decoder is built using jxl-rs, a Rust-based library
  • JPEG XL is defined by ISO/IEC 18181 standard
  • The feature has been available on Nightly and via Firefox Labs checkbox since version 152
  • Performance benchmarks show Firefox slightly ahead of Safari on the test machine after multithreading improvements
  • Safari shipped JPEG XL in version 17.0 in 2023; Chrome has it behind a flag with no ship announcement

Sources

← All posts