[wp-trac] [WordPress Trac] #51228: Include support for the AVIF image format
WordPress Trac
noreply at wordpress.org
Mon Oct 24 15:10:18 UTC 2022
#51228: Include support for the AVIF image format
--------------------------+------------------------------
Reporter: lukefiretoss | Owner: adamsilverstein
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Media | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by gregbenz):
Replying to [comment:19 adamsilverstein]:
> Thats unfortunate! Can you use something like `picture` element to get
Safari to fall back to another format?
It's more complicated than just support for the file type. Safari and
Firefox will load the image, but not render it properly. And even if they
did, showing an SDR image (could also be AVIF) is more optimal than
allowing the browser to tone map an HDR image.
I'm working on a more nuanced test for my own site to load HDR images when
both the display and browser will properly support it.
A media query might eventually partially resolve this in combination with
something like the picture element. That's probably a ways off based on my
testing. And even if that worked, the HDR headroom on 400 nits displays
goes to 0 when the screen is at full brightness, so you'd want to show SDR
there. There's no great fix for that (but it isn't a big problem, I'm just
talking about optimizing things from the perspective of a professional
photographer).
There is an experimental JS API to query HDR headroom (see test #8 at
gregbenzphotography.com/hdr#tests). That would be the ultimate way to
determine which images to show. However, that currently requires a
developer flag on Chrome and then user permission. Hopefully user
permission won't be required for this long-term, as the headroom data is
very useful for optimizing display.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51228#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list