AVIF files are about 20 to 50 percent smaller than WebP. When your server cannot create them, Pixavif makes WebP only and your images are still optimized. Adding AVIF later is easy: Pixavif converts the library again with one click.
Ways to get AVIF
- Switch to PHP 8.1 or newer. Its GD library usually includes AVIF. Most hosting panels let you change the PHP version per site.
- Ask for Imagick with libheif. ImageMagick 7 built with libheif writes AVIF.
- Move to a host with current image libraries if neither is possible.
GD lists AVIF but has it switched off
Some PHP builds include the AVIF function in GD but were compiled without a working AVIF encoder. PHP then reports “AVIF image support has been disabled”. The Server tab shows this as a GD problem. Switching the PHP version does not help when every version on the server is built the same way. Your host, or whoever manages your VPS, needs a PHP build with libavif, or Imagick built with AVIF support.
After your host updates the server
Array
Array