Intent to Prototype: JPEG XL decoding support (image/jxl) in blink

4692 views
Skip to first unread message

Moritz Firsching

unread,
Mar 30, 2021, 3:20:21 PM3/30/21
to blin...@chromium.org, Lode Vandevenne, Alex Deymo, Jyrki Alakuijala

Contact emails

de...@chromium.org, firs...@google.com, lo...@google.com, jy...@google.com


Explainer


https://jpeg.org/jpegxl/

http://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf


Specification

https://arxiv.org/abs/1908.03565


Summary

JPEG XL is a new royalty-free image codec targeting the image quality as found on the web, providing about ~60% size savings when compared to original JPEG at the same perceptual quality, while supporting modern features like HDR, animation, alpha channel, lossless JPEG recompression, lossless and progressive modes. It is based on Google's PIK and Cloudinary's FUIF, and is in the final steps of standardization with ISO.


This feature enables image/jxl decoding support in the blink renderer.



Blink component

Blink>Image


Motivation

The main motivations for supporting JPEG XL in Chrome are:

 - The improvement in image quality vs image size, about 60% file size savings for the same visual quality (lossy compression of larger originals) when compared to JPEG at the qualities found on the web.

- Improved visual latency by both smaller download sizes and supporting progressive decoding modes.

 - Support for HDR, animation and progressive all together in the same image codec. 

 - Support for lossless-recompressed JPEGs

 - Ecosystem interest in JPEG XL: Several Google teams evaluated using JPEG XL for storing and delivering images, as well as outside of Google: including CDNs interest in storing lossless-recompressed JPEGs as JPEG XL and converting to JPEG on request is the browser doesn't support JXL. Facebook is exploring to use JPEG XL.




Initial public proposal

Support decoding image/jxl behind a feature flag which is turned off by default on all platforms. 


Search tags

jxl


TAG review

Not applicable for image decoders


TAG review status

Not applicable


Risks



Interoperability and Compatibility

JPEG XL is in the final stage ISO standardization. 


Firefox has an open bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1539075

Edge/Safari - no signals yet


Gecko: No signal


WebKit: No signal


Web developers: high interest/many stars in the tracking bug, and there was a separate external crbug requesting the feature. 

A lot of interest on encode.su, r/jpegxl, discord, ...


Is this feature fully tested by web-platform-tests?

No, but planning to have complete tests before shipping. 


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1178058


Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1178040


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5188299478007808


This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Apr 1, 2021, 3:53:36 AM4/1/21
to blink-dev, Moritz Firsching, Lode Vandevenne, Alex Deymo, Jyrki Alakuijala, Kenji Baheux, Kinuko Yasuda
Thanks for working on this! I'm excited about the possibilities around progressive loading.
It may be interesting to work with the Loading team on complementary image loading primitives that would enable us to get the full benefits from this (e.g. to enable high-quality zooming-in, while reusing already downloaded image bytes)

It may be useful to file for signals at some point: https://bit.ly/blink-signals

Yoav Weiss

unread,
Apr 16, 2021, 5:54:25 AM4/16/21
to blink-dev, Moritz Firsching, Lode Vandevenne, Alex Deymo, Jyrki Alakuijala, Kenji Baheux, Kinuko Yasuda
Belatedly realized that I failed to provide advice to y'all about content negotiation and `<picture>` support.
A lot of what I suggested [1] [2] to the AVIF folks would similarly apply to JXL - basically we want to ensure that both server side and client side selection is possible such that supporting browsers would be served with JXL and non-supporting browsers with other formats that they do support.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/adc4e284-03ae-4431-a4e3-eae4046db821n%40chromium.org.

Anne van Kesteren

unread,
May 7, 2021, 5:17:25 AM5/7/21
to Moritz Firsching, blink-dev, Lode Vandevenne, Alex Deymo, Jyrki Alakuijala
On Tue, Mar 30, 2021 at 9:20 PM 'Moritz Firsching' via blink-dev
<blin...@chromium.org> wrote:
> Specification
>
> https://arxiv.org/abs/1908.03565

I'm not really sure what the best place to raise this, but raising
this on blink-dev as Chromium seems to be the furthest along with JPEG
XL.

To what extent are
https://w3ctag.github.io/design-principles/#new-data-formats and
https://github.com/annevk/orb/issues/3#issuecomment-779630945 being
considered here? This is the first new format with a new signature
that I know of so ideally we use this opportunity to not further
increase the bad security behavior of the past. As written there I
think at minimum we should require a MIME type in the img element
processing model (similar to SVG) and at best we would also require
CORS (similar to module scripts).

Yoav Weiss

unread,
May 10, 2021, 4:37:15 PM5/10/21
to Anne van Kesteren, Moritz Firsching, blink-dev, Lode Vandevenne, Alex Deymo, Jyrki Alakuijala
On Fri, May 7, 2021 at 11:17 AM Anne van Kesteren <ann...@annevk.nl> wrote:
On Tue, Mar 30, 2021 at 9:20 PM 'Moritz Firsching' via blink-dev
<blin...@chromium.org> wrote:
> Specification
>
> https://arxiv.org/abs/1908.03565

I'm not really sure what the best place to raise this, but raising
this on blink-dev as Chromium seems to be the furthest along with JPEG
XL.

To what extent are
https://w3ctag.github.io/design-principles/#new-data-formats and
https://github.com/annevk/orb/issues/3#issuecomment-779630945 being
considered here? This is the first new format with a new signature
that I know of

Why is a new signature a requirement for starting to enforce MIME types?
 
so ideally we use this opportunity to not further
increase the bad security behavior of the past. As written there I
think at minimum we should require a MIME type in the img element
processing model

That seems reasonable, but I'd like to hear from folks about the potential deployment hurdles it may pose for serving the format from servers that don't translate e.g. the .jxl extension to the right MIME type.
It may make sense to seed popular servers with that MIME type mapping as early as possible.

(similar to SVG) and at best we would also require
CORS (similar to module scripts).

A CORS requirement would be a significant deployment hurdle, as it would mean that e.g. image CDNs wouldn't be able to automatically serve JXL to supporting browsers unless the markup is modified to match.
 

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Luca Versari

unread,
May 13, 2021, 12:02:09 PM5/13/21
to blink-dev, ann...@annevk.nl, blink-dev, Lode Vandevenne, Alex Deymo, Jyrki Alakuijala, Moritz Firsching
How is JPEG XL the first new format with a new signature? My understanding is that AVIF's signature is also a new one.
WebP's too, but I suppose that WebP predates these other technologies. 

Ashley Gullen

unread,
Oct 31, 2022, 2:01:44 PMOct 31
to blin...@chromium.org
Apologies for bringing back an old thread, but I thought it was important to bring this up here.

I was surprised to read that Google are abandoning their efforts to implement JPEG-XL: https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c84

As I understood it, JPEG-XL brought significant improvements over existing image formats, and had a lot of interest in the technology world. However the reasons cited were apparently lack of benefits and lack of interest.

I for one was interested in this format and the improvements it would bring, and it seems many others are disappointed too.  Can Google explain how they came to this conclusion? How are they evaluating the benefits and interest? Even this intent to prototype lists many of the purported benefits and the extent of the interest, which makes this reversal particularly hard to understand.




--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Jim Bankoski

unread,
Nov 11, 2022, 10:58:28 AMNov 11
to blink-dev, ash...@scirra.com

Helping the web to evolve is challenging, and it requires us to make difficult choices. We've also heard from our browser and device partners that every additional format adds costs (monetary or hardware), and we’re very much aware that these costs are borne by those outside of Google. When we evaluate new media formats, the first question we have to ask is whether the format works best for the web. With respect to new image formats such as JPEG XL, that means we have to look comprehensively at many factors: compression performance across a broad range of images; is the decoder fast, allowing for speedy rendering of smaller images; are there fast encoders, ideally with hardware support, that keep encoding costs reasonable for large users; can we optimize existing formats to meet any new use-cases, rather than adding support for an additional format; do other browsers and OSes support it?

After weighing the data,  we’ve decided to stop Chrome’s JPEG XL experiment and remove the code associated with the experiment.  We'll work to publish data in the next couple of weeks. 

For those who want to use JPEG XL in Chrome, we believe a WebAssembly (Wasm) implementation is both performant and a great path forward.


Jim

Thomas Steiner

unread,
Nov 11, 2022, 11:07:55 AMNov 11
to Jim Bankoski, blink-dev, ash...@scirra.com
On Fri, Nov 11, 2022 at 4:58 PM 'Jim Bankoski' via blink-dev <blin...@chromium.org> wrote:

Helping the web to evolve is challenging, and it requires us to make difficult choices. We've also heard from our browser and device partners that every additional format adds costs (monetary or hardware), and we’re very much aware that these costs are borne by those outside of Google. When we evaluate new media formats, the first question we have to ask is whether the format works best for the web. With respect to new image formats such as JPEG XL, that means we have to look comprehensively at many factors: compression performance across a broad range of images; is the decoder fast, allowing for speedy rendering of smaller images; are there fast encoders, ideally with hardware support, that keep encoding costs reasonable for large users; can we optimize existing formats to meet any new use-cases, rather than adding support for an additional format; do other browsers and OSes support it?

After weighing the data,  we’ve decided to stop Chrome’s JPEG XL experiment and remove the code associated with the experiment.  We'll work to publish data in the next couple of weeks. 

For those who want to use JPEG XL in Chrome, we believe a WebAssembly (Wasm) implementation is both performant and a great path forward.


Jerzy Głowacki

unread,
Nov 13, 2022, 9:12:00 AMNov 13
to blink-dev, tste...@google.com, blink-dev, ash...@scirra.com, jimba...@google.com
With respect to new image formats such as JPEG XL, that means we have to look comprehensively at many factors: compression performance across a broad range of images; is the decoder fast, allowing for speedy rendering of smaller images; are there fast encoders, ideally with hardware support, that keep encoding costs reasonable for large users; can we optimize existing formats to meet any new use-cases, rather than adding support for an additional format; do other browsers and OSes support it?

JPEG XL is much faster than AVIF - JPEG XL encoding is about three times as fast as AVIF [1, 2]. JPEG XL supports progressive decoding and JPEG transcoding, unlike AVIF. JPEG XL is available in Firefox Nightly (under a flag) and it is being implemented by Facebook, Adobe, Intel, Krita, The Guardian, Cloudinary, Shopify and more companies. So there is definitely enough interest from the industry. If JPEG XL was implemented in Chromium, it would quickly boost adoption by CDNs and replace JPEG in a short time thanks to lossless JPEG transcoding capability. So what was the real rationale for dropping JPEG XL support?

As for the WebAssembly implementation, the jxl_dec.wasm file is 821 KB [3] (290 KB gzipped) and it can only run after DOM tree is ready and JS is parsed, so it will never be as performant as the native JPEG XL decoder and it will not work when JS is disabled.

Arnab Animesh Das

unread,
Nov 14, 2022, 12:50:42 PMNov 14
to blink-dev, jimba...@google.com, ash...@scirra.com
I won't reiterate most of the stuff as Jerry Glowacki has already mentioned most of it. If you think supporting JPEG XL is an unnecessary burden at least allow passthrough support similar to HEVC. It should require no future maintenance from your end and everybody is happy.

We don't know the exact reason why you are removing it, but if you are worried if they may eat into each others adoption (i.e. AVIF vs JPEG XL) I say that it should be the least of the concerns. Today webp and jpeg is living side by side as they have different use cases. AVIF has different use cases as compared to JPEG XL. AVIF excels at low fidelity standard images with slower encoding times whereas JPEG XL excels at hi fidelity progressive images with faster encoding times while allowing for easy transition from JPEG. Let the end users decide what's best for them.

Jon Sneyers

unread,
Nov 16, 2022, 11:16:26 AMNov 16
to blink-dev, jimba...@google.com, ash...@scirra.com
One 'elephant in the room' question that is perhaps uncomfortable but I think it needs to be asked nevertheless, is if and how this "weighing the data" was done in a fair and transparent way without being influenced by conflicts of interest. I observe that several people within the Chrome organization are proverbially wearing two hats: one is to "help the web to evolve" as a developer of the single most important web browser, the other is to push the adoption of codecs they helped create. These two interests can of course be perfectly aligned (as is the case with the AV1 video codec, for example), but they can also conflict.

How can we make sure that this particular decision on JPEG XL gets made in a fair and transparent way? Because as it is right now, there is definitely a perception that this is an instance of the "not invented here" syndrome and that AVIF proponents within Chrome are essentially being prosecutor, judge and executioner at the same time.

Obviously I am a JPEG XL proponent myself so I am biased myself. My personal opinion is that both formats complement one another: AVIF is a great replacement for GIF and WebP while JPEG XL is a great replacement for JPEG and PNG, and both bring substantial improvement to the web platform.

Wouldn't it be wise to invite external experts — who have no particular 'horse in the race', so to speak — to investigate this question, review the existing data, gather their own data, weigh it, and suggest the best way forwards? I think this would be a better approach to make sure that Chrome in the end "does the right thing".

Best,
-Jon.

Devin Wilson

unread,
Nov 27, 2022, 5:58:17 PM (4 days ago) Nov 27
to blink-dev, jimba...@google.com, ash...@scirra.com
Given that AVIF is about 100 times more computationally intensive to encode than JPEG XL for the same quality, have you calculated how many excess tons of carbon dioxide will be emitted thanks to this decision? That would appear to be a significant cost borne by everyone outside of Google.
Reply all
Reply to author
Forward
0 new messages