Is JPEG XL too slow for the web?

Posted on:September 16 2026

Since browsers now seem to start adding support for JPEG XL again, I am in the process of implementing JPEG XL support for the next update of my website builder.

And once it worked, I was baffled: Opening websites with JPEG XL images took very long. So long, I needed to add code to show a "busy" indicator.
Was I doing something wrong?
I looked into it, and it turned out no: JPEG XL is kind of slow when decoding my images. On my a-bit-over-average machine, it feels like it takes about 1-2 seconds per large image to load it. So I looked into it:

Tested Loading the same file (4608x2080) with JXL, JPG, PNG and WebP.



Using C++ - x64 - /O2 optimization on a i5 2.5ghz, version 0.12 of libjxl.



By reducing the quality of the .jxl file a bit, I was able to load the image faster (413ms instead of 515ms, for a quality value of 90 instead of 94). But it's still too slow.

The problem is not only that JPEG XL is very slow, it's that it takes more time than you as human are ok with waiting. For me, it's just a bit above the limit you are used to wait for an image to load. It simply feels wrong.

Also, JPEG XL is the single largest image decoding/encoding library which I ever added to my app. And it has so many dependencies.
I've stripped it down to the minimum and reduced it a lot, and in total, it still adds 508 source code files to the project. That's 15(!) times more than for example libPNG needs. I will have much fun maintaining this in the future.

JPEG XL might be technically a nice accomplishment, but I personally think for the insignificant amount of file size and quality improvements - JPEG XL is not worth it for the web. It feels like a overengineered piece of unnecessary software - at least for that use case. But maybe I'm wrong.





Comments:


I'm really curious where these numbers come from. While I don't have access to the exact image you used, a similar image encoded with the default jxl options results in 46 ms running `Measure-Command {djxl test.jxl test.ppm}`. Even forcing single-threaded decoding it's 150 ms.
enivex
Quote
2026-09-16 14:33:59


I think djxl uses multithreading, all the tests - also the other libraries are using a single thread.
Apart from that maybe you have a faster machine? Did you try comparing the other codecs on your machine?
niko
Quote
2026-09-16 15:53:56


What platform are you building for with what vectorization? Something is wrong.
q0s0
Quote
2026-09-16 20:26:18


Interesting, this guy here had some similar findings (scroll a bit down): https://giannirosato.com/blog/po...
zoltur
Quote
2026-09-16 21:14:02


zoltur wrote:
Interesting, this guy here had some similar findings (scroll a bit down): https://giannirosato.com/blog/po...


There are a couple implications in that other post that affect the decode test.
- It uses `jxl_cli --speed-test` which does two decodes internally for more accurate printout, but the test measures externally.
- It's comparing JXL with preserved alpha against other formats with the alpha channel stripped.

For this post, IDK, maybe they are compiling to Wasm for JXL.
q0s0
Quote
2026-09-17 05:56:59


Add comment:


Posted by:


Enter the missing letter in: "Internati?nal"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons