--
Also, I was under the impression that after backtracking, Chromium was relying on Mozilla to come up with a Rust port, but it seems it was the reverse. Good on Google Research.
https://hacks.mozilla.org/2026/08/intent-to-ship-jpeg-xl/
> So, we laid down a challenge to the JPEG XL team at Google Research: Build a safe, performant, compact, and compatible JPEG XL decoder in Rust, and we’ll ship it. That challenge was met; Google Research built jxl-rs, and it’s the core of our JPEG XL support in Firefox.
jxl-rs started to outperform the C++ library 2 months ago.
And Apple including support in their default graphics library so every iOS (and Mac) supported it. (I use Firefox, but let's not pretend like they'd move the market on JXL support.)
Not only Rust does C API, but Objective-C the way it allows to call Apple platform and call Apple compatible functions back.
Also well integrated Rust programs(with platform calls and low level hardware access) are well compiled without Apple SDK.
3-4 kicking Rust solutions are easy findable in this area.
Also webp is IMO subjectively worse at the same file sizes than the other two. Dunno if there's any studies on it to back that up though. It also has a max image size that is plausibly a problem in some use cases (16k in one dimension) while AVIF is 65k per axis and JXL 1M per axis.
It’s very rare that the actual performance benefits of rust implementations come from rust itself (though it does often push you to slightly better patterns). They usually come from the fact that rust implementations are usually a second (or 3rd, or 4th) iteration of the design, and the lessons learned help performance.
The other benefit of rust is that the stronger type system makes it easier to iterate and optimise without bugs creeping in. But once optimisations are implemented in rust, there isn’t that much pain to porting them back to c++, as long as someone cares enough to do so.
Also the compatibility with existing JPEG files that was mentioned below, unlike other formats you can losslessly convert a JPEG into a JXL without losing quality but saving file size in the process.
* it actually has better compression than PNG for this
* and potentially AVIF too, but this is debated
jxl shines when you want to do anything even a little bit more complex. Support for lots more color formats, including fp ones. Support for an image with parts of it encoded losslessly, and parts with a lossy encoder. Great progressive decoding. And many more features.
Lossy: webp (VP8 I-frame format which means mandatory 4:2:0 chroma subsampling and ungodly smoothing) was never good, AVIF is better but only equal or worse at decent, visually transparent bitrates.
Another point worth mentioning: AV1/AVIF doesn't really have a standard encoder, libaom is a reference codec thus slow and not really interested in proper psy optimizations, SVT-AV1 is slowly getting there thanks to enthusiasts porting x264's good stuff to it but remains locked to 4:2:0 (lol). I won't even speak about the missed promises of FGS.
And finally, JXL's format has a lot of gizmos that make it more future proof as something to replace JPEG/PNG/GIF. Progressive decoding, lossless conversion from JPEG, very large limits (float bitdepth for HDR, image dimensions without tiling, unlimited channels incl. CMYK support) are good even when the encoder isn't yet supporting everything.
JXL was dead. Apple is who brought it back to life[1], and the only reason Chrome resurrected JXL, and now Firefox followed their path, is because Apple pushed JXL support to a billion plus devices.
I know people like complaining about Apple, but there's a "read the room" kind of moment where people just seem to either not know the context or are just knee jerking.
[1] Worth noting that Apple used the reference implementation, libjxl, and that project still remains the reference implementation with the Rust port being experimental (and of course Apple deployed JXL support over a year before the Rust port even existed). Maybe they'll switch to it at some point, but it's a bit premature to complain about.
but why would you bother? The rust library is the one that is being chosen to use. There is no point optimizing a library which is not going to be used.
A C++ program might do template metaprogramming at compile time and the same thing at runtime in Rust, or vice versa. The C++ version might use virtual functions that rust wouldn't use. The Rust version might simply give more optimization information to the backend. The C++ version might use fairly awful parts of the stdlib like iostreams or shared_ptr that rust simply implements better. Etc.
Or maybe they're just focused on the rust implementation as they should be.
I don't think anyone is claiming that. I took the GP's point as what was desired was a "safe, performant, compact, and compatible JPEG XL decoder in Rust" and "performant" (as defined as the speed of the c++ version) was passed two months ago.
> They usually come from the fact that rust implementations are usually a second (or 3rd, or 4th) iteration of the design, and the lessons learned help performance.
Sure, and looking at the recent commit histories, the team is focusing on getting the rust version ready for this milestone for obvious reasons, and is less concerned about immediate parity in the c++ codebase.
I chose webp for long term storage of scanned documents in our SaaS product, as size reduction was more important than no banding.
Also webp has excellent support in modern software and operating systems. So that's not a drawback any more. JpegXL will be the best of all worlds choice in a few years when software support is good.
- people dispute it compresses meaningfully better the types of images typically found on the web.
- progressive decoding is increasingly less useful on the internet as more and more connections become latency limited instead of bandwidth limited. jpeg & png (Although png's version has a cost i think) both support progressive decoding. However the last time i saw an image actually progressively decode was probably mid 2000s.
-flexibility in file formats is usually a bad thing. look at tiff.
personally i think jxl is massively overhyped. Its not horrible by any means, but its only marginally better than existing stuff, at best.
If browsers extended `srcset` with support for HTTP Range requests, we could use a progressive-encoded jpg (xl or not) file as the source for multiple detail levels.
A device with a small screen would request the first 10kb of the image, while one with a medium screen might fetch 40kb.
The big advantage of that - for sites with many images - is a much better cache hit-rate for a given CDN spend.
Additionally, if you've already fetched a small version of an image and then want to view a bigger version, you've already got partial content downloaded & can fetch only the rest of the file.
Which is to say, Chrome followed Firefox here.
(Yes, I know Google Research implemented jxl-rs, but then, they also implemented jxl. Chrome’s position appears independent of them.)
Lossless webp is a completely different image format compared to lossy webp, even though they come under the same file extension. Unlike lossy webp, it's a good image format that has excellent compression ratio compared to png. I've often been using it for screenshots to avoid damaging text clarity and still maintain acceptable file size.
jxl has excellent support for both lossy and lossless cases, and can replace both lossy avif (even if somewhat less efficient at low file sizes), and lossless webp.
Note also that converting jpeg to jxl is 100% reversible, you can convert it back to exactly the same image (byte for byte identical) if you need to.
Does it do tiles? What about pyramids (i.e. precomputed downscaled images, think mipmaps)? Right now the state of the art for truly large images (medical, geospatial, scanned artworks) seems to be JPEG (and I think also JPEG 2000?) tiles in TIFF containers, which would be fine except nobody seems to agree on how exactly to express the pyramids.
Things apple do because apple do:
- make a mouse you can't use while charging it
- gets bored of the power inefficency L of x86, makes the fastest arm cpu that causes x86 manufacturers get serious about power
- hey, those f keys? what if useless strip
- decades ahead in panel tech and refuses to compromise
Significantly more on that here: https://infrequently.org/series/browser-choice-must-matter/
There is a rust encoder in active developing by someone outside the core JPEG XL devs.
Where is the software support lacking other than the browsers at this point?
I'm not one to usually defend Apple-ism, but it always felt that this was such a nothing-burger. The mouse charges in like fifteen minutes and lasts for weeks. I don't have a work Macbook (or job :) ) right now, but when I did I would just occasionally plug it in while I went to the bathroom. It really was not nearly as annoying as everyone said it was.
Speaking as someone who loves JXL, I have a serious question: I once used ImageMagick to convert a JPG to a JXL, and then back to JPG, and the final JPG was a noticeably different file size compared to the source JPG.
What am I misunderstanding here?
https://github.com/dlemstra/Magick.NET/discussions/872
cjxl / djxl do lossless transcode reliably when called with all defaults (no arguments). Just re-checked:
$ cjxl src.jpg out.jxl
(some output)
$ djxl out.jxl rev.jpg
(more output)
$ cmp src.jpg rev.jpg
(no output: files identical)(The IR used to be PixelPacket. Not sure how modern versions handle it.)
Which then tracks back to the beginning of the thread: the correct answer to whether apple will adopt jxl-rs or keep libjxl is "who knows, no point trying to predict them". Which is not a value judgement
How you square all of that with the iPhone regularly copying features Android had for years is your decision. Might be a symptom of the same, might be that this all was an entirely inaccurate description of Apple
unread,
Aug 24, 2026, 12:15:09 PM (2 days ago) Aug 24
As of Firefox 157 I intend to turn JPEG XL decoding on by default on all platforms. It has been developed behind image.jxl.enabled, which today is on by default on Nightly only, and has had a Firefox Labs checkbox on every channel since 152. The decoder is jxl-rs, in Rust.
Bug to turn on 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 with 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 in 17.0 in 2023. Chrome has it behind #enable-jxl-image-format using the same Rust library, no intent to ship yet.
Changes since the intent to prototype:
Performance was a concern raised on the intent to prototype thread. jxl-rs 0.6.0 was released with multithreaded decoding support, and our patches to hook up and enable multithreaded decoding are expected to land soon. Including those patches, I ran a five-format decode benchmark over the same pictures at a range of sizes: we were slightly ahead of Safari (using C++ libjxl) on my machine. Compared to our other image format decoders, JXL is close on large images, but shows a bigger gap on small ones.
It has feature parity with our other image formats and with Blink's JXL implementation, including animation and progressive display. The one exception is HDR: HDR images display as SDR, the same as every other format we support, but our tone mapping for JXL is much better than what we do for other image formats. Safari has neither progressive rendering nor animation.
The wpt jpegxl directory covers decode correctness across bit depths, alpha, grayscale, CMYK, colour management, orientation and the coding tools, plus the HTML and CSS ways an image gets used. Where wpt could not express something I added gecko tests: about 30 gtests for chunked and incremental decoding, animation frame counts, downscale during decode and corrupt files, mochitests for progressive rendering and telemetry, reftests, and decode benchmarks that report to Perfherder. The fuzzing team already fuzzed jxl before it was enabled on nightly and they will fuzz the decoder again before I flip the pref.
Timothy Nikkel
unread,
Aug 24, 2026, 12:37:11 PM (2 days ago) Aug 24
unread,
Aug 25, 2026, 9:22:05 AM (21 hours ago) Aug 25
to dev-pl...@mozilla.org, tni...@mozilla.com
Is Animated JXL currently supported?
unread,
Aug 25, 2026, 9:40:26 AM (21 hours ago) Aug 25
to 一丝, dev-pl...@mozilla.org
Yes. Animated jxl is supported.
Tim
unread,
Aug 25, 2026, 11:40:40 AM (19 hours ago) Aug 25
to dev-pl...@mozilla.org, tni...@mozilla.com
I am concerned about lossless JPEG XL performance. In my measurements it is 30x slower to decode than lossless WebP, in exchange for a 10% reduction in file size. This is a questionable trade-off, especially on laptops and phones where it could drain battery and degrade user experience.
I suggest shipping only lossy JPEG XL in Firefox 157, and considering lossy JPEG XL format separately.
Measurement methodology
jxl-rs from git https://github.com/libjxl/jxl-rs on commit 775837f57dfe4294d89c1c6317dd91a1ed8d3cfa compiled with 'cargo build --release'
converted to WebP with 'cwebp -lossless', to JPEG XL with 'cjxl -d 0'
Both decoders running in single-threaded mode to measure total CPU time taken with '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 ms ± 2.2 ms [User: 449.5 ms, System: 217.5 ms]
Range (min … max): 664.3 ms … 670.1 ms 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 tool is 20x slower than WebP in the same measurement. So it doesn't look like further optimizations to the Rust code could help, but would not change the overall calculus.
Reply all
Reply to author
Forward