Problem/Motivation
AVIF image file format is getting traction in browsers' support.
Write up with examples https://jakearchibald.com/2020/avif-has-landed/
This issue is proposing to implement support to this image format in Drupal core's GD Toolkit.
Done:
- libgd should support the AVIF format - DONE, first release supporting is 2.3.2, released on: March 6, 2021
- a PHP version supporting an IMAGETYPE_AVIF constant - upstream PR https://github.com/php/php-src/pull/5127 - supported with PHP 8.1
- a DrupalCI testbot container should be available for testing.
- #3239935: Refactor ToolkitGdTest
- a bot with a PHP 8.1. instance compiled with
libavif
support - a PHP 8.2 bot to test getimagesize() on AVIF
- #3116611: Add a requirements check for GD support of allowed image types
- Bots having PHP instances that can fully support AVIF files - currently the bots' PHP, 8.1 and 8.2, cannot save files via
imageavif()
, the (bundled?) GD library is missing an appropriate codec supporting the write. (Also see https://bugs.php.net/bug.php?id=81217 , https://github.com/php/php-src/pull/7526 )
Proposed resolution
Extend the GD toolkit to support AVIF too.
Remaining tasks
Figure out what to do about the fact that AVIF has to be compiled into PHP and that automatic detection is hard.
https://github.com/libgd/libgd/issues/782
https://github.com/php/php-src/pull/7526
User interface changes
new conversion format available for image effect "convert"
API changes
no
Data model changes
no
Release notes snippet
GDToolkit now supports the AVIF image format.