Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #60910


Ignore:
Timestamp:
04/03/2024 05:55:17 PM (3 months ago)
Author:
swissspidy
Comment:

Hi there and welcome to WordPress Trac!

As the note says, AVIF in WordPress depends on support in your web server’s image processing library

If AVIF is not in the "GD supported file formats" list, it means your version of GD does not support AVIF.

AVIF support in GD is only possible in PHP 8.1 or newer, but only if the GD extension is compiled with AVIF support. It depends on libavif package, which may not be available in default repositories of older operating system versions.

In your case, that means:

  • Either you are not using PHP 8.1+, or
  • You are using PHP 8.1+ but GD has not been compiled with AVIF support

Either way, that means you should reach out to your hosting provider to inquire about adding AVIF support on your server.

They could possibly achieve this also through setting up ImageMagick so that WordPress uses ImageMagick instead of GD for image processing.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #60910

    • Property Keywords close added; changes-requested needs-patch removed
    • Property Component changed from Formatting to Media
  • Ticket #60910 – Description

    initial v1  
    99
    1010FOR your information:
     11
     12{{{#!php
    1113function add_avif_to_upload_mimes($mime_types) {
    1214    $mime_types['avif'] = 'image/avif';
     
    3335}
    3436add_filter('file_is_displayable_image', 'avif_is_displayable', 10, 2);
     37}}}