Make WordPress Core

Changeset 58305


Ignore:
Timestamp:
06/03/2024 08:25:37 PM (4 months ago)
Author:
adamsilverstein
Message:

Media: improve GD support detection for AVIF.
Fix an issue where the GD image library falsely reports supporting the AVIF format, when support is actually missing. Add an additional function check to ensure AVIF support is really available.
Props niktat, adamsilverstein.
Fixes #60910

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor-gd.php

    r57917 r58305  
    7373                return ( $image_types & IMG_WEBP ) !== 0;
    7474            case 'image/avif':
    75                 return ( $image_types & IMG_AVIF ) !== 0;
     75                return ( $image_types & IMG_AVIF ) !== 0 && function_exists( 'imageavif' );
    7676        }
    7777
Note: See TracChangeset for help on using the changeset viewer.