13 ms·
JPEG XL: How it started, how it’s going
- swyx 3y agogreat writeup. i wish it had started with the intro of "wtf is JPEG XL" for those of us not as close to it. but the ending somewhat approximates it. i'm still left not knowing when to use webp, avif, or jxl, and mostly know that they are difficult files to work with because most websites' image file uploaders etc dont support them anyway, so i end up having to open up the file and take a screenshot of them to convert them to jpeg for upload. so do we think Chrome will reverse their decision to drop support?
- ocdtrekkie 3y agoThe only way to strip Chrome of their monopoly power is to remove their decisionmaking mattering: Switch all your stuff on your websites to JXL, let Chrome provide a bad experience, and then it's up to them if they fix it.
- jraph 3y agoSadly, unless many webmasters do it, it'll likely feel like "your site is broken" instead of "Chrome is broken" to users. Maybe with a banner like "You are using Chrome. You might have a degraded experience due to the lack of support for better image formats. Consider Firefox".
- pgeorgi 3y agoProvide alternative formats, making the browser autoselect. Or provide a JXL polyfill. In either case: Have Chrome telemetry report home that "user could have 20% faster page load with JXL support".
- wolpoli 3y agoJXL polyfill is definitely the way to go to force Chrome's hand.
- alwillis 3y agoIt’s not going to force Google’s hand. Using a polyfill will slow page loads and adds additional fragility. Nothing changes for Chrome users, especially sites using the <picture> element where the first supported image format is used.
- worrycue 3y agoIt will slow page loads for Chrome and browsers not supporting it but it will be blazing fast on Safari. You keep the file size savings and high image quality. I’m sure YouTubers and tech sites will love to do Safari vs Chrome (and Co.) content to spread the message that Chrome is inferior.
- Zen1th 3y agoFeels a little like a déjà vu from an older browser by a big company that had a monopoly.. IMO, the sad truth is that what will happen is that JXL simply won't be used because it's not worth it to lose customers in exchange for a few kilobytes saved. Google has won, it has a monopoly on search, advertisement and the browser and decides de facto of all standards.
- yboris 3y agoChrome did not settle things with its decision to not use JXL at this time. (WASM) Polyfill and we're done.
- jraph 3y ago> Feels a little like a déjà vu from an older browser by a big company that had a monopoly.. Any resemblance with previous events would be totally unintentional, of course :-)
- brucethemoose2 3y ago> so do we think Chrome will reverse their decision to drop support? Nope. Microsoft could probably push Google over the Edge. They have a lot of influence over Chrome with Edge/Windows defaults, business apps and such.
- youngtaff 3y agoIf they don’t they’re going to look pretty stupid… Chrome Leadership stated “we’ll only support JXL if Safari do” to at least one large tech company who were unhappy with JXL being dropped by Chrome (and no I can’t tell you how I know this)
- asddubs 3y agoMicrosoft also weirdly go out of their way to strip AVIF support from Edge
- brucethemoose2 3y agoI noticed that. It feels disturbingly tribal.
- pgeorgi 3y ago> so do we think Chrome will reverse their decision to drop support? The argument was that there's no industry support (apparently this means: beyond words in an issue tracker), let's see how acceptance is with Safari supporting it. An uptick in JXL use sounds like a good-enough reason to re-add JXL support, this time not behind an experimental flag. Maybe Firefox even decides to provide it without a flag and in their regular user build.
- mgaunard 3y agoWe all know what the real argument is: NIH.
- bbatsell 3y agoOne of the three main authors of JXL works for Google. But in the Google Research Zurich office, so he might as well not exist to the Chrome team, I guess.
- deleted 3y ago[deleted]
- masklinn 3y agoAh yes, NIH from a contributor to the spec, makes complete sense.
- mrguyorama 3y ago[flagged]
- jshier 3y agoOddly, Safari Tech Preview on Ventura advertises support for JXL but the images don't actually render. So the linked page has almost no images, just broken placeholders.
- malnourish 3y agoThe images shown to me are .avif (Firefox and Chrome on Windows)
- ComputerGuru 3y agoThe header image I see is indeed an AVIF but it depends on what your browser sends in the `Accept` header. Chrome sends image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 but if you drop image/avif from there you get a webp and if also drop image/webp from the header you finally end up with a jpeg. However if you manually request that image with a custom `image/jxl` at the start of the `Accept:` header, you get a JPEG XL result. So GP is correct, but you won't see that behavior except on their PC (errr, Mac) -- unless you use Firefox and enable JPEGXL support in about:config, of course.
- jshier 3y agoThe STP request includes jxl. image/webp,image/avif,image/jxl,image/heic,image/heic-sequence,video/;q=0.8,image/png,image/svg+xml,image/;q=0.8,/;q=0.5
- ComputerGuru 3y agoYeah, I was explaining how you could reproduce those results without being on the Safari preview.
- markdog12 3y agoThe image formats (at least newer ones) in Safari defer to OS support, so you'll need Sonoma to view JXL in Safari.
- brucethemoose2 3y agoEh... The Apple ecosystem is relatively isolated. They adopted HEIF, and have not adopted AV1 video.
- est31 3y agoThey also adopted HEIC which is actually quite dangerous thing for the open web to be supported by a browser, given how heavily patented the standard is.
- brucethemoose2 3y agoYeah thats what I was thinking of, I forgot the distinction (and the other HEIF variants)
- pixelesque 3y agoThey adopted it at the OS level years ago (when iPhones started saving it as an option), but I think it's only been in iOS 17 Safari this year (i.e. in beta) that Safari itself has started supporting it... (At least Safari 16.5.2 on Ventura 13.4.1 won't open .heif / .heic files for me).
- alwillis 3y ago> Eh... The Apple ecosystem is relatively isolated. Sure, Apple shipped the first consumer computer that supported Display P3 in 2015 [1]. And while there are several other vendors including Google with devices that support Display P3, Apple’s 2 billion devices is not nothin’. [1]: https://en.m.wikipedia.org/wiki/DCI-P3#History https://en.m.wikipedia.org/wiki/DCI-P3#History
- awestroke 3y agoI truly think jpeg xl would have done better with a better name.
- dmbche 3y agoI like JXL better than Jpeg XL - if it is brought to the masses I can imagine "jexel" to replace "jaypeg"
- yboris 3y agoThe extension for the file format is .jxl and is pronounced "jixel" :)
- wongarsu 3y agoAh, following the footsteps of .png (which is pronounced ping, according to the standard)
- jedberg 3y agoIt's hilarious to me that 25ish years after the death of DOS, we still define dot-three-letter file extensions in new standards.
- pmarreck 3y agoRight? Well, at least in the tiny part of the IT world I get to control, I always try to validate based on both the three letter extension and any common or sensible expansion of that. So ".jpg" or ".jpeg", ".jxl" or ".jpegxl" etc. etc. (And in most cases, I actually try to parse the binary itself, because you can't trust the extension much anyway.)
- mrguyorama 3y agoEspecially funny since JPEG images commonly have .jpeg as an extension!
- skeaker 3y ago
- this_user 3y agoThe problem with trying to replace JPEG is that for most people it's "good enough". We already had "JPEG 2000", which would have been a step up in terms of performance, but it never saw any real adoption. Meanwhile, "JPEG XL" is at best an incremental improvement over "JPEG 2000" from the user's POV, which raises the question why people would care about this if they didn't about the previous one.
- deleted 3y ago[deleted]
- pgeorgi 3y agoJPEG2000 ran into a patent license trap. JPEG XL is explicitly royalty free.
- rwmj 3y agoBut that doesn't address the point that JPEG XL is only marginally better and has a gigantic mountain to climb if it ever hopes to displace JPEG (and likely never will given the vast set of JPEG files that exist and will never be converted).
- pgeorgi 3y agoJPEG XL can losslessy transcode JPEG into a smaller format. JPEG2000 (or WebP or anything but Lepton[0]) didn't offer that. Besides, we have gif and png for approximately the same space. gif still isn't gone. Displacement isn't necessary for a new format to become useful. [0] https://github.com/dropbox/lepton https://github.com/dropbox/lepton
- fold3 3y agoEven if JPEG-XL could be considered only 'marginally' better than JPEG, and as good or even worse than avif/webP in some specific context, it is unique in the fact that it can also do lossless, HDR, extremely high res, complex color channels, generation loss protection, multi layers, advanced authoring features, etc... It's not a format only meant for the web but plenty of other use cases such as in science, medecine, art print, etc. And not only that, it's reasonably fast to encode on consumer hardware. JPEG XL has the ambition to supplant all the images formats of the next 20+years.
- PaulHoule 3y agoI am not sure I believe the results from models like SSIMULACRA. It might be I am not encoding properly but when I did trials with a small number of photos with the goal of compressing pictures I took with my Sony α7ii at high quality I came to the conclusion that WEBP was consistently better than JPEG but AVIF was not better than WEBP. I did think AVIF came out ahead at lower qualities as you might use for a hero image for a blog. Lately I've been thinking about publishing wide color gamut images to the web, this started out with my discovery that a (roughly) Adobe RGB monitor adds red when you ask for an sRGB green because the sRGB green is yellower than the Adobe RGB green and this is disasterous if you are making red-cyan stereograms. Once I got this phenomenon under control I got interested in publishing my flat photos in wide color gamut, I usually process in ProPhotoRGB so the first part is straightforward. A lot of mobile devices are close to Display P3, many TV sets and newer monitors approach Rec 2020 but I don't think cover it that well except for a crazy expensive monitor from Dolby. Color space diagram here: https://en.wikipedia.org/wiki/Rec._2020#/media/File:CIE1931xy_gamut_comparison_of_sRGB_P3_Rec2020.svg https://en.wikipedia.org/wiki/Rec._2020#/media/File:CIE1931x... Adobe RGB and Display P3 aren't much bigger than the sRGB space so they still work OK with 8-bit color channels but if you want to work in ProPhotoRGB or Rec 2020 you really need more bits, my mastering is done in 16 bits but to publish people usually use 10-bit or 12-bit formats which has re-awakened my interest in AVIF and JPEG XL. I'm not so sure if it is worth it though because the space of colors that appear in natural scenes is a only bit bigger than sRGB https://tftcentral.co.uk/articles/pointers_gamut https://tftcentral.co.uk/articles/pointers_gamut but much smaller than space of colors that you could perceive in theory (like the green of a green laser pointer. Definitely Adobe RGB covers the colors you can print with a CMYK process well, but people aren't screaming out for extreme colors although I expect to increasingly be able to deliver them. So on one hand I am thinking of how to use those colors in a meaningful way but also the risk of screwing up my images with glitchy software.
- ndriscoll 3y agoI don't think it's fair to equate colors in natural scenes with the space of colors you find with diffuse reflection. There are tons of things (fireworks, light shows, the sky, your 1337 RGB LED setup, fluorescent art, etc.) people may want to take photos of that include emission, scattering, specular reflection, etc. In practice that larger space of things you could perceive "in theory" is full of everyday phenomena, and very brilliant colors and HDR scenes (e.g. fireworks against a dark sky) tend to be something people particularly enjoy looking at/taking pictures of.
- codemiscreant 3y agoSee also- https://dennisforbes.ca/articles/jpegxl_just_won_the_image_wars.html https://dennisforbes.ca/articles/jpegxl_just_won_the_image_w... It loads JXL if your client supports it. Recent builds of Chrome and Edge now support and display JXL on iOS 17. They have to use the Safari engine underneath, but previously they suppressed JXL, or maybe the shared engine did.
- dagmx 3y agoAfaik WebKit added support in iOS 17 so it’s just a transitive win
- skrowl 3y agoThere's only Safari on iOS. EVERY browser on iOS is just a skin on top of Safari's WebKit. See 2.5.6 here - https://developer.apple.com/app-store/review/guidelines/ https://developer.apple.com/app-store/review/guidelines/
- matricaria 3y agoWasn’t this supposed to change with iOS 17?
- tourmalinetaco 3y agoApple is dropping requirements for all browsers to use WebKit, but that doesn’t mean Mozzila/Google/Brave have started releasing them, especially with iOS 17 still being a beta. https://9to5mac.com/2023/02/07/new-iphone-browsers/ https://9to5mac.com/2023/02/07/new-iphone-browsers/
- codemiscreant 3y agoLiterally specifically said that. Yet Edge and Chrome on iOS actively suppressed JXL in prior builds (yes they can do that — actually calling it a skin is technically wrong as while the engine is Safari, they have a lot of flexibility), and very recently exposed it.
- derefr 3y agoQuestion: why do we see stable video and audio "container formats" like MKV that persist as encodings come and go (where you might not be able to play a new .mkv file on an old player, but the expected answer to that is to upgrade your player to a new version, with universal support for pretty much any encoding being an inevitability on at least all software players); but every new image encoding seemingly necessitates its own new container format and file extension, and a minor format war to decide who will support it? Is this because almost all AV decoders use libffmpeg or a fork thereof; where libffmpeg is basically an "uber-library" that supports all interesting AV formats and codecs; and therefore you can expect ~everything to get support for a new codec whenever libffmpeg includes it (rather than some programs just never ending up supporting the codec)? If so — is there a reason that there isn't a libffmpeg-like uber-library for image formats+codecs?
- DaleCurtis 3y agoWe're starting to see a move towards this with HEIF / AVIF containers, however in cases where "every bit must be saved" the general purpose containers like ISO-BMFF introduce some wastage that is unappealing.
- derefr 3y ago> however in cases where "every bit must be saved" the general purpose containers like ISO-BMFF introduce some wastage that is unappealing. Sure, but I don't mean general-purpose mulimedia containers (that put a lot of work into making multiple streams seekable with shared timing info.) I mean bit-efficient, image-oriented, but image-encoding-neutral container formats. There are at least two already-existing extensible image file formats that could be used for this: PNG and TIFF. In fact, TIFF was designed for this purpose — and even has several different encodings it supports! But in practice, you don't see the people who create new image codecs these days thinking of themselves as creating image codecs — they think of themselves as creating vertically-integrated image formats-plus-codecs. You don't see the authors of these new image specifications thinking "maybe I should be neutral on container format for this codec, and instead just specify what the bitstream for the image data looks like and what metadata would need to be stored about said bitstream to decode it in the abstract; and leave containerizing it to someone else." Let alone do you ever see someone think "hey, maybe I should invent a codec... and then create multiple reference implementations for how it would be stored inside a TIFF container, a PNG container, an MKV container..."
- mihaic 3y agoMaybe dumb question: If JPEG XL beats avif, and both are royalty free, shouldn't the AV group create a new video format based on av1 that for I-frames uses JPEG XL? I mean, it feels like the same static image codec should be used in whatever free standard is being pushed for both video I-frames and images, since the problem is basically the same.
- rhn_mk1 3y agoIIRC, JPEG XL beats avif on high-quality images, and avif is better on low quality. For typical vieo encoding, you don't care about perfection that much.
- formerly_proven 3y agoSpecifically, the biggest users of video codecs are video streaming websites/services where bitrate, not quality, is king. Logically, their codecs of choice are optimized toward the low bitrate, "sorta acceptable, but I thought I bought a 4K TV?" quality corner.
- The_Colonel 3y agoYeah, while in the case of images, the quality requirements are usually way higher.
- Joel_Mckay 3y agoIn general, the legacy hardware codec deployments are more important than what some ambitious software vendors think is "better". The primary inertia of media publishing markets, is content that will deliver properly on all platforms with legacy compatibility. Initially, a new software codec will grind the cpu and battery-life like its on a 20 year old phone. Then often becomes pipelined into premium GPUs for fringe users, and finally mainstreamed by mobile publishers to save quality/bandwidth when the market is viable (i.e. above 80% of users). If anyone thinks they can shortcut this process, or repeat a lock-down of the market with 1990s licensing models... than it will end badly for the project. There are decades of media content and free codecs keeping the distribution standards firmly anchored in compatibility mode. These popular choices become entrenched as old Patents expire on "good-enough" popular formats. Best of luck, =)
- tambre 3y agoDoesn't seem to much too relevant for image codecs though, no? Decoding 10s of still images on a CPU for a webpage that'll be used for minutes versus 10s of delta images in a much more complicated video coded aren't quite comparable. I don't think we have much deployment of WebP or AVIF hardware decoders yet the formats have widespread use and adoption.
- Joel_Mckay 3y agoWebP has problems (several unreported CVEs too), and is essentially another tga disaster under the hood. Anyone smart keeps those little monsters in a box. =) What I am seeing is the high-water-mark for WebP was 3 years ago... It is already dead as a format, but may find a niche use-case for some users. Consider built-in web-cams that have hardware h264 codecs built-in, as the main cpu just has to stream the data with 1 core. Better battery life for both the sender and receiver. Keep in mind a single web page may have hundreds of images, and mjpeg streams are still popular in machine-vision use-cases. As most media/gpu hardware is now integrated into most modern browsers, the inertia of "good-enough" will likely remain.. and become permanent as patents expire. =)
- brooksbp 3y ago
- yread 3y agoHow does mozjpeg compare to libjpeg-turbo? at what quality is jxl faster than mozjpeg/libjpeg-turbo?
- jahav 3y ago> MozJPEG is a patch for libjpeg-turbo. Please send pull requests to libjpeg-turbo if the changes aren't specific to newly-added MozJPEG-only compression code. https://github.com/mozilla/mozjpeg#mozilla-jpeg-encoder-project- https://github.com/mozilla/mozjpeg#mozilla-jpeg-encoder-proj...
- chungy 3y agoApples and oranges. JPEG XL is a new codec entirely (though it allows lossless conversion from JPEG).
- JyrkiAlakuijala 3y agoLibjxl includes a better jpeg encoder/decoder, too, called jpegli. It can be used as a drop-in replacement of mozjpeg or libjpeg(-turbo). It gives ~25 % more density in the high end and allows for 10+ bits (important for HDR use).
- drcongo 3y agoI feel like JPEG XL's problem is branding. The name suggests it's like JPEG, but the file size will be bigger which isn't something I want.
- formerly_proven 3y agoShould've been JPEG SX.
- Tommstein 3y agoDon't think that's the problem, but agree with what the name immediately suggests. It wouldn't have been very hard to come up with a name that implies "these files are better" instead of "these files are extra large."
- Clamchop 3y agoXL is pretty well understood to mean extra large, no?
- Tommstein 3y agoYeah, that's the only thing I (and I would bet 99.999% of everyone else) have ever understood it to mean.
- devnullbrain 3y agoHF, like a Lancia.
- willtemperley 3y agoA short explanation of what JPEG XL is or does at the beginning of the article would have been nice. Saying: """Google PIK + Cloudinary FUIF = JPEG XL""" Before saying what it is, was a little of-putting.
- Dylan16807 3y agoIt's a section header in an article written as a story. It's normal for those to not be understood until you read the section. And the explanation begins with the first sentence of that section. I don't think this is a reasonable complaint.
- willtemperley 3y agoBut they didn't even explain what FUIF or PIK might be in that section or even the entire article! To understand that article required me searching for FUIF [1], PIK [2] and a brief explanation of what JPEG XL is trying to achieve. I double down on my "complaint" - I'd call it constructive criticism - that article was poorly written. It's actually quite a good story that their Free Universal Image Format (FUIF) has achieved what it has. That's a great acronym, especially for a world that thinks JPEG XL is a good acronym! Why not put in in the article. To save anyone else time: [1] https://github.com/cloudinary/fuif https://github.com/cloudinary/fuif [2] https://github.com/google/pik https://github.com/google/pik
- Dylan16807 3y agoThat's a fair criticism, though personally I feel like "it was a candidate to be the next JPEG" is enough information here, even if it's a bit barebones. There are several levels of detail you could go into about how the codec works, and this article decided to stay quite light.
- jedberg 3y agoThis gives me a ping of nostalgia from back in the day with JPEG was new and you had to have an external application to see jpg files until the browsers started adopting the standard. Then you had to decide if there were enough jpg images on the sites you liked to warrant changing browsers!
- chad1n 3y agoI feel like Apple came to support JPEG XL too late, it will never take over like JPEG did, because Google dropped support for it in Chrome to support their own webps and avifs.
- vanderZwan 3y agoJPEG had a pretty slow start too though. I remember getting a viewer program on some shareware CD-ROM that would then take forever to decode a high-res image of an astronaut in the early nineties and not understandig what this was useful for.
- jokoon 3y agoI wish they would include the BPG format from Bellard, even though I don't know if that format is free from any inconvenient https://bellard.org/bpg/ https://bellard.org/bpg/ Note that jpg xl is different from jpg 2000 and jpg xr
- ksec 3y agoIn previous test by Cloudinary BPG were surprising better than AV1 and JPEG XL in some / many categories. Which lead me to believe VVC in BPG would have done even better.
- reyqn 3y agoI can't find what you're referring to, but I would be interested if you could share it.
- The_Colonel 3y agoBPG is based on HEVC which has patent/licensing baggage.
- bcatanzaro 3y agoOh man. We’re still dealing with the .heic debacle where you can’t use photos from your iPhone with many applications (like Gmail) unless you manually convert them to .jpg So crazy to me that Apple and Google fight over image formats like this. I guess this is just the next round.
- worrycue 3y agoCan’t you just set your iPhone to use the most compatible format (forcing it to use JPEG/h.264) for its camera?