upvote
Yes I think the major story here is Google removing and then re-adding it back. Big companies have big egos, so this is quite a miracle.

I have a feeling now JXL is here to stay, finally.

reply
The original libjxl was written in C and has been riddled with security issues. It’s been rewritten in Rust which is what has been shipped by Chrome and soon Firefox.

I have to think this is a substantial reason for the backflip here as adding a new huge C library to browsers is a huge concern.

reply
> Big companies have big egos

More likely the Google eng. director who tried to get rid of it because of not-invented-here syndrome (it was built in a different org) got a new job or changed company.

reply
deleted
reply
Wasn't it due to poor security? libjxl had notorious bugs that would've on par with webp exploit, if present in browser:

https://security.snyk.io/vuln/?search=libjxl

I remember Project Zero cautioning Google's browser team against adding insecure decoders/encoders.

reply
No, that was not part of the reason the Google Chrome team gave: https://groups.google.com/a/chromium.org/g/blink-dev/c/WjCKc...
reply
There are very interesting values here.

Somebody could think of the web as primarily a platform for consumption, in which case it is OK for it to support a limited number of formats, actually desirable because it reduces the attack area.

Another is that the web is connected to general purpose computing in which that case the web browser competes with GUI shells (e.g. explorer, finder) and should be able to support every image format that is commonly used on the platform.

Back in the 1990s most platform supported a lot of file formats that weren't JPEG or GIF but browsers didn't support them and only a small set of formats have been added since then.

A long time ago I ran some sites that hosted large image collections and I struggled with costs so I did a lot of thinking about how to optimize storage and transfer. I came to the conclusion about 5 years ago that WebP is consistently a win over Jpeg, but I've never been a fan of AVIF. Yeah, it does great for big blog hero images that people don't look at closely, but it makes my mirrorless shots look like they were shot on a cheap Android. Yeah, I've seen that picture of the F1 car and it is superficially impressive but if you look closely at the highlights you can see that it erased the real highlights and replaced them with something plausible but... different.

reply
Interesting.

I'm on the other side, I hate webp because if I download such an image a lot of apps don't support it. So typically I need to screenshot it instead to get a usable jpg/png.

Now one more format to hate.

I would say webp/jxl/avif is anti-general compute, since they require very recent software.

reply
Some people get mad at this reason for hating WebP, but it's so true. The main way in which most people's lives are affected by WebP is that images they download from the web no longer work.
reply
So true. If browsers would just allow users to save images from the web in the user's choice of original, PNG or JPEG format, this would be a huge win. I recall 25 years ago that Internet Explorer, when right-clicking and saving an image, allowed me to save it as whatever it was, or as a .BMP. Somehow that's impossible today??

I know that end-users making memes or whatever aren't a demographic that will matter for adoption, but it seems really weird that this is still a problem on Windows and Mac in 2026. I've searched for browser extensions to no avail.

reply
Copy image puts a bitmap on the clipboard but nobody wants to bloat the menu with saving in alternate formats.
reply
You don't need to bloat any menu. There's already a "Save image as..." context menu option which opens a save dialog. This dialog could have a way to select format.

I just tried it out now, using Waterfox on macOS 27. The save image dialog literally already has a Format dropdown. But I'm guessing it's just a weird part of some native dialog, it lets me select between "WebP Image" and "All Files". This kind of design could've been used to allow the user to save it as a different format than what it was served as.

reply
Personally I get mad at the programmers who sit there not updating their image decoding library for over a decade.
reply
However many decades you wait, libpng is not gonna add support for WebP
reply
I'm also mad at anyone that linked to only libpng.

If you have support for multiple file types, you're already using multiple libraries or you're using a library that handles several kinds of file, either way you can and should update that.

reply
We had plug-ins to support them all.
reply
And that was a pretty bad solution. Nobody wants to see "this web page doesn't display correctly because you're missing the bla bla plug-in".
reply
For the hundredth time, I miss Amiga’s “datatypes” system. You’d download a sound or image or video or compression library and drop it in the right place to register it with the OS. Then any app which used the OS’s built-in system for opening media files automatically got support for that format, without changing a line of code.

Imagine if installing libzstd meant that every program on your computer suddenly knew how to use ZSTD compression, or adding libjpegxl added support to every browser, word processor, and age editor you’d already installed.

Some parts of AmigaOS were wonky, like lack of memory protection. Others would still be phenomenally useful today.

reply
that's what firefox said, not chrome
reply
And even Firefox took well over a year to bring it up, after stating they didn’t really care for JPEG XL. It was literally no one’s primary concern from the get-go.
reply
Probably why Google implemented their own decoder in Rust

https://developer.chrome.com/blog/jpeg-xl-in-chrome#safety_f...

reply
“Their own” is a bit misleading. It’s largely a subset of the people who implemented libjxl in the first place, but this time in Rust.
reply
The top three contributors to the reference implementation are also Google employees. https://github.com/libjxl/libjxl/graphs/contributors?all=1
reply
That’s what I was getting at, yes. (I contributed to both and am sitting with another core contributor right now.)
reply
I'm sure those implementers got their fair share of the Google profit or at least a nominal donation for doing most of the work of building out a feature enhancement

right?

reply
Thanks for pointing that out. The stated reasoning for not supporting JXL is understandable, though quite vague. It feels like the sort of general trade-offs you could cite about not supporting any codec. In my experience in large companies, such 'tough choices' on features that would be "nice to have, but doesn't make the priority cut" are usually driven by demand from internal stakeholders or corp strategy not exceeding budget/head count constraints.

While I'm happy for the reversal, it would be helpful to have a corresponding explanation addressing what changed leading to this reversal just two years later (assuming the decision to support was made 9-12 mos ago). Since significant decisions are usually harder to make in big companies (due to many competing prioritities, stakeholders, and processes), they tend to also be harder to reverse (especially in just two years, when most of original deciders are still in the same roles). I suspect the real thing that changed is more interesting than "the technology or people changed" or "our prior assessment was wrong".

reply
> removed a while ago and them seemingly not being interested in supporting it

Removed because no one from Google benifits from supporting it then.

Re-added because someone could get a promotion by supporting it now.

reply
> nobody benifits from supporting it

Do you mean the users of the browsers not benefitting, or specific Google employees/stakeholders?

reply
What a silly question, Google has never cared about users.
reply
Yes, I meant Google employees/stakeholders.

They always abandon shit like this.

reply
There were obviously some internal politics going on—Google joined the Alliance for Open Media, a consortium of the who's who of the media/tech industry: Apple, Facebook, Microsoft, Amazon, Netflix, Nvidia… the list goes on. They supported AVIF as the next generation image format.

Google apparently wanted to be one of the "cool kids" supporting AVIF. When they removed the JPEG XL code from Chrome, they created the excuse that there was little demand for it, along with some other disingenuous talking points that didn't quite make sense. Ironically the project that ended up becoming JPEG XL was started by Google employees in Switzerland.

Anyway, I’m glad Google is supporting JPEG XL now. I wanted to use JPEG XL files for a project I started a month ago, but it was a non-starter with global usage under 20% at the time.

reply
Removed because having yet another giant C codec was a huge risk, re-added because the PDF Association chose JXL as their next image format so anyone rendering PDFs (including browsers) is now required to have it.
reply
"Required" is a strong word. More than enough people use Chrome as a PDF viewer that if Google decided to not support JXL, you'd see ~0 PDFs with it.

Another giant codec is only a huge risk if you run the decoder in the renderer process, which they say in the linked thread they do, but I don't see a sane reason why.

I'm sure if they asked the secret Gemini 4.0 AGI to use their existing very good sandbox to throw all the decoders in their own process and only share the image buffers, it could do it in a few hours.

reply
> Removed because having yet another giant C codec was a huge risk

Removed because trillion dollar advertising company don't bother, which also happens to be the browser vendor monopoly.

How many man-hour effort does it take to create jxl-rs ?

https://github.com/libjxl/jxl-rs/graphs/contributors

reply
Why do browsers need to support every media format? Why can't it be shipped as a shared library for the whole system to use?
reply
> Why can't it be shipped as a shared library for the whole system to use?

Flashbacks to DataTypes on the Amiga: https://wiki.amigaos.net/wiki/Datatypes_Library

reply
My favourite tidbit about the Amiga is that it was the first platform that got PNG support in all its web browsers: you just had to install the png.datatype.
reply
AmigaOS was the first to bring a lot of smart ideas to a consumer platform.

I got my A1000 in late '85 and only had prior exposure to 8-bit home computers (C64, Atari, etc), CP/M and DOS (no mainframes, minis or workstations). I didn't actually use Macs or early Windows until the early 90s and it was shocking how backward they still seemed in some ways. I'd sort of the assumed the other major platforms were making similar advancements throughout by the late 80s and shocked to find out how wrong I was. It wasn't until the mid-90s that PCs and Macs felt like they mostly caught up on QoL and OS features.

reply
> Why can't it be shipped as a shared library for the whole system to use?

That's how it works on macOS; the bundled apps (Preview, Photos, etc.) gained support for JPEG XL.

reply
This way browser vendors control what their app supports, and won't have something break because a user doesn't have a library.
reply
Google seems to prefer reimplementing every portion of an OS possible in Chrome.
reply
If you want things to work every single time on a billion different devices this is how you do it.
reply
Yeah, and then 100 different apps can repackage the browser engine as an Electron app, each weigh 300+mb.

I saw this recently with Balena etcher. It's a firmware flashing app with about 10 buttons total. It's over 400mb because it's written in node and has an electron GUI.

Good jerb.

reply
When your flashing app starts getting bigger than the operating systems it's writing, you should start asking yourself some questions.

  ~$ du -h $(which dd)
  76K     /usr/bin/dd
Etcher truly is the clowniest Electron app of them all.
reply
Better and similar size:

    $ du -h $(which pv)
    116K     /usr/bin/pv
pv has a progress bar and nicer syntax. Next time you need to write an image, try:

    sudo pv -Yo /dev/blah /path/to/your/image.img
The -Y makes it sync after each write so that the progress bar represents actual progress instead of just how fast you can copy to kernel write buffers.

My life improved measurably after I contributed that '-o' flag to pv and it then made its way into all my systems through regular OS updates :)

reply
Nice pro-tip! Thanks stranger.
reply
Long live dd! Except every time I use it I am terrified I'll blow out the brains of the wrong device :/

Another example clown app: the MacOS downloads of TuxGuitar, a Java app, used to just ship as a zip with a big jar in it. Now it ships an entire Java Runtime environment specific to your processor architecture. It's 480MB. Derp.

reply
> the MacOS downloads of TuxGuitar, a Java app, used to just ship as a zip with a big jar in it. Now it ships an entire Java Runtime environment specific to your processor architecture. It's 480MB.

MacOS used to include Java out of the box, and then they stopped doing that. How else should an app reasonably behave to keep supporting new versions of the system?

reply
Requires: Java 22 [link]
reply
> It's a firmware flashing app with about 10 buttons total.

What you're saying is it's the ideal kind of application for not obsessing over its background resource consumption, given that it's only going to be running for 10 minutes once or twice a year.

reply
Indeed. The most goofy is their proprietary Print dialog. I think(?) they added it to gain a previewing pane, but Apple added that capability to the native print dialog about 10 years ago. Chrome still forces its old bespoke one though, and when you do the extra click to get the OS standard one, they apparently don't use the previewing API, so it's missing.
reply
Given that there are more operating systems than browser engines these days, I'm not sure this would be an unequivocal win.
reply
Eh. WebKit, Blink, Gecko being the big ones, supporting Windows, Linux (and alikes — maybe one would consider Android separate in this context) and Darwin (in this context iOS/macOS is the same). Mostly 1:1.

The thing is that it's still just a library, it just happened to be pre-installed. CGImage is just a helper in the Core Graphics library, not some magical "native"/"core" functionality in the OS that would be different than any other library with the same features.

An equivalent library for Linux (glycin for example), or per-format libraries like jxl-rs, are not "included in the OS", and tend to be the very same libraries one would use for Windows. If that does the trick on most platforms, then why have the maintenance burden of doing something different on macOS if all it does is save a few bytes on disk?

From Google's perspective, they would likely not want Chrome for macOS to gain support for jxl as the sole platform anyway, even if they are using CGImage and could decode it that way...

reply
I'd definitely consider Android separate from Linux, yes. Their multimedia subsystems are completely different. The same applies to tons of embedded Linux platforms running an embedded Chromium or WebKit.

Browsers have also largely switched to handling most aspects of TLS and certificates themselves, despite there being OS libraries for those as well; the same applies to HTTP.

reply
Because browsers want to provide a consistent platform and can’t rely on OS vendors to do it in the way they need and prioritize their interests.
reply
But it is a shared library? It's used in both Chrome and Firefox.
reply
Which both vendor it.
reply
> Why can't it be shipped as a shared library

Shared libraries are a bad idea that is simply taking way too long to just die the horrible death it deserves.

reply
Such an important piece of software does not want to subject itself to the packaging and support woes of shared libraries. There are security issues, maintainability issues, and much more headache by going with that approach.

Static linking is one and done, headache gone. People have large drives these days, so it's not a problem.

There are areas where the browser will dynamically link, but those are more OS-related than image and file format codecs.

reply