nucliweb/image-element

JPEGXL 0.01%, & maybe not AVIF

tomByrer opened this issue · 3 comments

I do not think JPEGXL should be recommended at all, & likely not for 6mo+, if that. Has needed a flag for a year. Is promising, but we're not there yet.
https://caniuse.com/jpegxl
Only browser I know with it turned on is Thornium, & it has no market share.
https://github.com/Alex313031/Thorium#features--differences-between-chromium-and-thorium--

Also, I'm on the fence with AVIF. There is no hardware accelerations AFAIK; so images could actually 'time-to-glass' slower due to decoding time.
There was some talk about tapping into Apple Silicons' AV1 hardware decoding, but I'm not aware if that got implemented & if other chips & OSes can do that.
Secondly I found some color shifting with AVIF; likely because it seems to convert back & forth color spaces.

Hi @tomByrer, thank you for you feedback.

I'm agree about the JPEG XL support, I'm a early adopter 😅

About the AVIF image format, your examples are of screenshots, AVIF is not the best format to images with text, I'm going to take a closer look at that issue, thanks for sharing.

Btw, the idea of the repo is to know to use the image tag to improve the UX and the Web Performance, I'm not advising that one format is better than another, that depends a lot on the images.

AVIF is not the best format to images with text,

Oh, I need to test that; thanks!
I think AVIF is good for pictures (landscapes, portraits). Might be trouble if keeping specific colors exact (eg branding colors, match image colors with CSS colors).

Just keep in mind how many programmers just copy/paste ;)

https://twitter.com/jensimmons/status/1666058844122894336

Yes, Safari 17 supports JPEG XL. On macOS Sonoma, macOS Ventura and macOS Monterey, as well as iOS, iPadOS, watchOS, and soon, visionOS.

See also: https://caniuse.com/jpegxl

According to https://gs.statcounter.com/ , Safari has a market share of 20%.

It's true that JPEG XL previously has little adoption, but now that Apple has become an adopter, perhaps we should recommend it?