AVIF image optimization requires PHP 8.1 or later and the imageavif() function to be enabled on the server. To check whether the function is available, the following command should be run:
- php -r "echo (function_exists('imageavif') ? 'enabled' : 'disabled') . PHP_EOL;"