Firefox 157 will include JPEG XL by default on all platforms

Aug 26, 2026 12:55 AM - 2 hours ago 3

Timothy Nikkel

unread,

Aug 24, 2026, 7:15:09 PM (2 days ago) Aug 24

to [email protected]

As of Firefox 157 I intend to move JPEG XL decoding connected by default connected each platforms. It has been developed down image.jxl.enabled, which coming is connected by default connected Nightly only, and has had a Firefox Labs checkbox connected each transmission since 152. The decoder is jxl-rs, successful Rust.

Bug to move connected by default: https://bugzilla.mozilla.org/show_bug.cgi?id=2065096

Standard: ISO/IEC 18181, https://www.iso.org/standard/85066.html

Standards body: ISO/IEC

Platform coverage: all

Preference: image.jxl.enabled

Standards position: https://github.com/mozilla/standards-positions/issues/522 (neutral)

TAG review: https://github.com/w3ctag/design-reviews/issues/633 (satisfied pinch concerns)

Intent to prototype: https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/53b4e3e0-5eee-4768-a1ba-b069e1e85244n%40mozilla.org

Other browsers: Safari shipped successful 17.0 successful 2023. Chrome has it down #enable-jxl-image-format utilizing the aforesaid Rust library, nary intent to vessel yet.

Changes since the intent to prototype:

Performance was a interest raised connected the intent to prototype thread. jxl-rs 0.6.0 was released pinch multithreaded decoding support, and our patches to hook up and alteration multithreaded decoding are expected to onshore soon. Including those patches, I ran a five-format decode benchmark complete the aforesaid pictures astatine a scope of sizes: we were somewhat up of Safari (using C++ libjxl) connected my machine. Compared to our different image format decoders, JXL is adjacent connected ample images, but shows a bigger spread connected mini ones.

It has characteristic parity pinch our different image formats and pinch Blink's JXL implementation, including animation and progressive display. The 1 objection is HDR: HDR images show arsenic SDR, the aforesaid arsenic each different format we support, but our reside mapping for JXL is overmuch amended than what we do for different image formats. Safari has neither progressive rendering nor animation.

The wpt jpegxl directory covers decode correctness crossed spot depths, alpha, grayscale, CMYK, colour management, predisposition and the coding tools, positive the HTML and CSS ways an image gets used. Where wpt could not definitive thing I added gecko tests: astir 30 gtests for chunked and incremental decoding, animation framework counts, downscale during decode and corrupt files, mochitests for progressive rendering and telemetry, reftests, and decode benchmarks that study to Perfherder. The fuzzing squad already fuzzed jxl earlier it was enabled connected nightly and they will fuzz the decoder again earlier I flip the pref.

Timothy Nikkel


Timothy Nikkel

unread,

Aug 24, 2026, 7:37:11 PM (2 days ago) Aug 24

to [email protected]

一丝

unread,

Aug 25, 2026, 4:22:05 PM (10 hours ago) Aug 25

to [email protected], [email protected]

Is Animated JXL presently supported?

Timothy Nikkel

unread,

Aug 25, 2026, 4:40:26 PM (10 hours ago) Aug 25

to 一丝, [email protected]

Yes. Animated jxl is supported.

Tim

Sergey Davidoff

unread,

Aug 25, 2026, 6:40:40 PM (8 hours ago) Aug 25

to [email protected], [email protected]

I americium concerned astir lossless JPEG XL performance. In my measurements it is 30x slower to decode than lossless WebP, successful speech for a 10% simplification successful record size. This is simply a questionable trade-off, particularly connected laptops and phones wherever it could drain artillery and degrade personification experience.

I propose shipping only lossy JPEG XL successful Firefox 157, and considering lossy JPEG XL format separately.

Measurement methodology

jxl-rs from git https://github.com/libjxl/jxl-rs connected perpetrate 775837f57dfe4294d89c1c6317dd91a1ed8d3cfa compiled pinch 'cargo build --release'

converted to WebP pinch 'cwebp -lossless', to JPEG XL pinch 'cjxl -d 0'

Both decoders moving successful single-threaded mode to measurement full CPU clip taken pinch 'taskset -c 0'.

$ hyperfine --warmup 5 'taskset -c 0 target/release/jxl_cli --speedtest 55_Cancri_e_Final_1_30.jxl' 'taskset -c 0 dwebp 55_Cancri_e_Final_1_30.png.webp'
    Benchmark 1: taskset -c 0 target/release/jxl_cli --speedtest 55_Cancri_e_Final_1_30.jxl
      Time (mean ± σ):     20.632 s ±  0.061 s    [User: 20.605 s, System: 0.027 s]
      Range (min … max):   20.549 s … 20.743 s    10 runs
     
    Benchmark 2: taskset -c 0 dwebp 55_Cancri_e_Final_1_30.png.webp
      Time (mean ± σ):     667.0 sclerosis ±   2.2 sclerosis    [User: 449.5 ms, System: 217.5 ms]
      Range (min … max):   664.3 sclerosis … 670.1 sclerosis    10 runs
     
    Summary
      taskset -c 0 dwebp 55_Cancri_e_Final_1_30.png.webp ran
       30.93 ± 0.14 times faster than taskset -c 0 target/release/jxl_cli --speedtest 55_Cancri_e_Final_1_30.jxl

For reference, libjxl's djxl instrumentality is 20x slower than WebP successful the aforesaid measurement. So it doesn't look for illustration further optimizations to the Rust codification could help, but would not alteration the wide calculus.


More