@arichtman avif is pretty great, isn’t it?
@jaffathecake Really hard to pick!
The lossless conversion from JPEG is huge, as it more or less makes it a better JPEG. Progressive decoding is also fantastic.
@jaffathecake I can't wait for another format that is very widely supported on the web while somehow still occasionally ignored by native applications like webp
(I'm being sarcastic)
What are you trying to achieve? -> smaller images Have you searched for similar feature requests? -> Yes, see also #2245 What would you expect the API to look like? -> Same as other formats. What a...
> Its lossy encoding speed is also brilliant compared with the CPU-intensive AVIF/AV1
This is pretty important to Next.js since images are optimized on demand when they are requested (based on the Accept header).
We noticed a lot of users don't like how long it takes to convert to AVIF (compared to WebP) which is why AVIF is still opt in but WebP is default.
@eeeps @jaffathecake Yes, there's no sign of libjxl's multi-threaded API in WebKit https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/image-decoders/jpegxl/JPEGXLImageDecoder.cpp
Other performance-related factors here might be that the current WebKit logic first fully decodes a JPEG-XL image into memory then copies the entire thing pixel-by-pixel into another bit of memory then, because of the embedded ICC profile, hands over to lcms to convert pixel values.
@AmeliaBR @jaffathecake Does this have current authoring tool support?
(I use JPEG XL off the Web myself, so I’m not generally a JPEG XL skeptic, but I’m curious which things are in the category “I have seen this in action off the Web and want to have it on the Web” and which things are in the category “I have not witnessed this, yet, but I want it from a feature list”.)
@jaffathecake a lot of what other folks said. The compression and the performance are the feature I’m interested in. Also, while I guess you could get this with AVIF, too, being able to use the same format from camera to browser would make photo workflows a lot easier.
I don’t think the question should be AVIF OR JPEG-XL, though. I feel like having good support for both would benefit the web as upgrades over the current formats.
By far, I would be most excited if browsers could handle progressive decoding on one image file rather than websites having to handle multiple file sizes.
I also like that it has lossless conversion with the existing JPEG format.
@jaffathecake I think for the web, the two key features of jxl compared to other formats are:
1. Reliable and very effective high-fidelity lossy compression, in particular for HDR images which I hope will get traction on the web in the near future;
2. Lossless JPEG recompression: a no-brainer to improve delivery of existing legacy images for which only already-compressed versions exist.
There are other nice things like progressive decoding, future-proof format design, across-the-workflow, etc
@jaffathecake I love progressive rendering, but the reality is that situations in which it makes user-visible difference are getting increasingly rare.
Whenever loading of a 200KB image takes seconds, you're probably already mad at the 5MB JS bundle that blocks it.
@jaffathecake it's harder than it seems.
Browsers throttle re-rendering of pages during loading. Lots of things can block and delay render.
TLS makes data arrive in blocks, often 16KB (configurable for those who know how, but adds overhead).
Congestion and bufferbloat make data arrive in laggy bursts rather than slowly. Very bad signal strength also tends to be on/off. You may need H/2 pri tricks and large images to even have partial data to render.
@jaffathecake Progressive is useful server-side when making thumbnails, but also tricky.
Downloading less data is hard due to latency of cancellation. Server-side connections are way faster, and all images seem insignificant compared to Docker images.
Partial progressive render doesn't get the same sharpness and gamma as proper image resizing from full-res, so you need to overshoot progressive res to be safe, which lessens the savings.
Lots of image proc libraries don't support it anyway.
@kornel I'm rereading your statement and I guess what you mean is that applications with lots of thumbnails are targeting GPU formats directly, which is true in some cases.
However, I think there's an opportunity to deliver thumbnails in a more compact image format and transcode them to a GPU format on the device. I wonder if there's anyone doing this, or interested in doing so.
@jaffathecake we've seen a gallery of people's handcrafted ones that make very creative use of its features
we'd like to see the web have more room for creativity, in general
the lossless conversion from older formats is also really nice
I use JPEG-XL mainly for lossless like small logos and images which don't work well with lossy, or need to look particularly good. JPEG-XL is noticeably smaller than WebP for this, which is itself better than AVIF (which has quite poor lossless). It's also good for high-fidelty lossy as well, especially for images. The video-derived AVIF and WebP are incredible (and better) for low-bitrate compression, but not so great for less compressed images.
I also like the progressive decoding a lot, and it's much faster to encode than AVIF.