logoalt Hacker News

Shipping JPEG XL in Chrome

252 points • by AshleysBrain • today at 11:25 AM • 131 comments • view on HN

Comments

xx_ns • today at 11:46 AM

It's exciting to see JXL support being re-added in Chrome after being removed a while ago and them seemingly not being interested in supporting it [1].

I think JXL is a cool image format, but was being held back by the most popular browser not supporting it, limiting its use (in the web especially) by a lot.

[1]: https://issues.chromium.org/issues/40270698

➕ show 4 replies
jug • today at 2:06 PM

And soon Firefox will include it in Stable. During October it will go from Safari only to majority coverage. Eventful month!

While AVIF may have a slight edge in some cases like in fairly lossy compression, you won't really go _wrong_ with JPEG XL (unless strongly CPU constrained) and I think the strength of the format is its extreme versatility as a "be all end all image format" for some time where comparative performance depending on functionality ranges from respectable to excellent. It can work as a replacement for AVIF, PNG, JPEG, WebP, even certain TIFF required scenarios (high bit depth, multichannel, layers) depending on use cases.

swiftcoder • today at 11:50 AM

See previous HN discussions for context:

Google set to deprecate JPEG XL support in Chrome 110 - https://news.ycombinator.com/item?id=33399940

JPEG XL support has officially been removed from Chromium - https://news.ycombinator.com/item?id=33933208

Chrome Jpegxl Issue Reopened - https://news.ycombinator.com/item?id=46033330

The case agains JPEG XL - https://news.ycombinator.com/item?id=49690554

revolvingthrow • today at 12:31 PM

Glad to see it happen. I'd prefer it there was just one format rather than both jxl and avif, but at least it's the final nail in the coffin of webp which seems to have accomplished little but annoy people for not much gain.

The wider ecosystem support is still far from commonplace, but it is slowly changing. iOS 18 wouldn't work with .jxl in Photos, but 27 does. Similarly, quick look and preview works fine on MacOS 27, thumbnails show up properly etc. I also found no issues with .jxl on linux, and image editors are slowly adding support as well.

Plain old jpg will still be everywhere for the next decade, but I'm glad that we finally have superior options with no real downsides, and without all the patent bullshit to boot.

➕ show 1 reply
kelseydh • today at 11:59 AM

Every time a new image format comes out, I think about the compatibility crisis between apps.

E.g. Telegram still doesn't have sane support for .webp, it treats them as stickers. MacOS can take a long time to update with support for new formats. Image viewer apps even longer, many never updating to support new formats.

➕ show 7 replies
cyberrock • today at 12:07 PM

The tortoises have somehow outrun the hare because Safari still hasn't turned on progressive loading in libjxl (which had this feature since before Safari added the feature), while FF (non Android) and Chrome shipped with it enabled. The 3 year long chess clock is now flipped.

tepmoc • today at 12:20 PM

One downside is that you cannot tell if format lossy or lossless by looking at its extension.

➕ show 5 replies
eviks • today at 2:45 PM

Took them long enough with a few embarassing detours, but a welcome news nonetheless! Has anyone ~blogged about some of the internal dynamics that lead the G ship to course-correct, would be curious to read?

➕ show 1 reply
YesThatTom2 • today at 11:58 AM

Drat! I hoped this was going to cover the internal battle where Google executives trying to stop JPEG XL and how engineers finally convinced them to change their minds.

My guess: the engineers didn’t win the argument. The executives just gave up once all the other browsers had added support.

➕ show 6 replies
Evidlo • today at 2:36 PM

Wanted to use this for building a viewer for astronomical imagery but the decoder resamples to 8 bits internally unfortunately.

Have to stick with AVIF which supports up to 12 bits.

Synaesthesia • today at 11:47 AM

So it's supported now by all the major browsers (Firefox support coming soon) as well as all the major OSes.

➕ show 2 replies
tniemi • today at 12:08 PM

Watching the example image load I had this flashback of the past, where images were 256 color interlaced GIFs, downloading slowly, line by line...

➕ show 1 reply
tsuru • today at 2:28 PM

Any way for those who enjoy dynamic languages (non-Python) to call it via FFI?

boutell • today at 12:17 PM

Are they switching it on in Android Chrome? That would complete the picture of at least baseline support... eventually... when a decent percentage of Android phones actually get that version.

But Safari (MacOS or iOS) still doesn't support the progressive rendering shown here, nor animation, if caniuse is up to date:

https://caniuse.com/jpegxl

Not to be a downer — it's one necessary step on the road.

gen2brain • today at 12:44 PM

After some time, this seems to be the first image format, now in production, not being just the nus product of some video format.

rfgplk • today at 1:51 PM

Fun fact, I needed JPEG XL support for my C++ pipeline and I didn't feel like including any official libraries. Roughly $500 tokens later I had a fully working optimized JPEG XL spec compliant en/de/coder that outperformed the official codepaths (both cpp and rust) by 70% (lower runtime). Took literally 5 hours to build out. Can someone tell me what Google is doing?

➕ show 1 reply
codingjoe • today at 11:43 AM

Is this the same patent/license nightmare as JPEG2000 ?

➕ show 1 reply
shevy-java • today at 12:29 PM

About three years ago I had to find a replacement for old .jpg files and .png files.

The main two contenders were .avif and .webp. For a few reasons, I selected .avif and in hindsight I think it was the better, choice. Both would be objectively better than jpg or png.

With JPEG XL ... hmmm. AVIF is not perfect, in particular when the compression rate is very high I noticed that some photos lose a lot of intrinsic quality that is not instantly obvious; I noticed this when I took various pictures over the years from outdoors. Still, AVIF beats jpg and png just about on every metric when compression is required. With JPEG XL I guess I have to re-evaluate, but right now I am still sticking to avif. The two factors that will be important for me is compression ratio and quality. I am ok with a bit of loss of quality, if the compression is better, but I am not sure JPEG XL beats AVIF here clearly either, so I am not sure what to do with JPEG XL.

➕ show 1 reply
sylware • today at 11:48 AM

I thing the endgame is lossless PNG with 16bit color components with basic compression like gzip or at best bzip2. Or a format without the weirdness of PNG 'line based loading' which is obsolete nowdays. The "expensive part", apart from the compression algorithm, being the meta data storage without kludge.

➕ show 3 replies
dorianmariecom • today at 2:30 PM

what a terrible name

mschuster91 • today at 1:04 PM

> built-in HDR support

Oh hell no. HDR is already bad enough in Youtube on iOS where there seems to be no way to turn it off - you tune your brightness to something decent in bed... and then some video by some showoff dingus scrolls across the feed frying your eyeballs.

Fuck HDR or at the very least give people an option to turn it off!

➕ show 2 replies
Jeeetendra • today at 2:58 PM

[dead]

dorianmariecom • today at 11:42 AM

obligatory xkcd https://xkcd.com/927/

theandrewbailey • today at 11:45 AM

It's great that Chrome is shipping JPEGXL.

AVIF is still better at 1 bit per pixel and less. (JPEGXL is more efficient at more than that.) Is it possible for JPEGXL to beat that?

➕ show 2 replies
mococa • today at 11:44 AM

They need to relay on Rust to write safe code…

➕ show 1 reply