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 Built from https://develop.svn.wordpress.org/trunk@58305 git-svn-id: http://core.svn.wordpress.org/trunk@57762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2107b186fe
commit
5e65c40921
|
@ -72,7 +72,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||||
case 'image/webp':
|
case 'image/webp':
|
||||||
return ( $image_types & IMG_WEBP ) !== 0;
|
return ( $image_types & IMG_WEBP ) !== 0;
|
||||||
case 'image/avif':
|
case 'image/avif':
|
||||||
return ( $image_types & IMG_AVIF ) !== 0;
|
return ( $image_types & IMG_AVIF ) !== 0 && function_exists( 'imageavif' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-58304';
|
$wp_version = '6.6-alpha-58305';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue