[wp-trac] [WordPress Trac] #51228: Include support for the AVIF image format

WordPress Trac noreply at wordpress.org
Fri Jul 7 15:00:01 UTC 2023


#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:  has-patch needs-unit-    |     Focuses:  performance,
  tests                              |  sustainability
-------------------------------------+-------------------------------------

Comment (by nickpagz):

 @gregbenz
 >When you say it loses its HDR characteristics, do you know specifically
 what has been lost? Does it convert and clip HLG/PQ content to a gamma
 EOTF?

 I'm not sure what that means, lol, but I can share the images. I borrowed
 the Grand Mosque image from your site and scaled it down (by one pixel) in
 the Media Library. Both the original and scaled images are in this dropbox
 link:
 [https://www.dropbox.com/sh/7sxcblgz3fuzvu0/AAAwjXttTkAUbVn5llrUnqZ9a?dl=0]

 Perhaps you can have a look and let me know.

 I think what we're seeing is there's some catching up to be done by the
 libraries (IM & GD) in order to successfully handle images with these
 additional "layers" of information (gain maps, alpha channels, etc). Even
 if the libraries are able to handle some of or a subset of these, hosting
 companies will still need to compile these libraries to include the
 support. For example, I reached out to the system folks over at Pressable
 and requested they compile the GD library included with their PHP8.2
 version specifically to be able to handle avif's as the "vanilla" version
 didn't support it out of the box.

 I don't know enough about how core handles the image manipulation process
 to know if the code would have to change to catch up with the IM or GD
 library changes, but my guess is that's left up to the libraries to "just
 handle" the details.

 Having said that, the PR by @adamsilverstein works great for "SDR" AVIF's,
 is a leap ahead of webp's in terms of quality and size of images, and
 should be merged into core as soon as possible, imo. This would allow you
 to still use your "HDR" images on your site, but you'd have to be careful
 to always display the original image in your content (vs having WordPress
 or your theme use one of the thumbnail/generated sizes). There's different
 ways to do this. Similarly, you wouldn't want your image CDN to serve
 manipulated versions either.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51228#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list