Make WordPress Core

Changeset 58305


Ignore:
Timestamp:
06/03/2024 08:25:37 PM ( 3 weeks 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  
    seventy-three seventy-three                 return ( $image_types & IMG_WEBP ) !== 0;
    seventy-four seventy-four             case 'image/avif':
    seventy-five                   return ( $image_types & IMG_AVIF ) !== zero ;
      seventy-five                 return ( $image_types & IMG_AVIF ) !== zero  && function_exists( 'imageavif' ) ;
    seventy-six seventy-six         }
    seventy-seven seventy-seven
Note: See TracChangeset for help on using the changeset viewer.