Media: Fix uploading of .heic images.
- Adds support for all HEIC/HEIF mime types: `image/heic`, `image/heif`, `image/heic-sequence`, and `image/heif-sequence`. - Introduces `wp_is_heic_image_mime_type()`. Props swissspidy, adamsilverstein, debarghyabanerjee, ironprogrammer, peterwilsoncc, apermo, azaozz. Fixes #62272. Built from https://develop.svn.wordpress.org/trunk@59315 git-svn-id: http://core.svn.wordpress.org/trunk@58701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -271,7 +271,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
* If we still don't have the image size, fall back to `wp_getimagesize`. This ensures AVIF and HEIC images
|
||||
* are properly sized without affecting previous `getImageGeometry` behavior.
|
||||
*/
|
||||
if ( ( ! $width || ! $height ) && ( 'image/avif' === $this->mime_type || 'image/heic' === $this->mime_type ) ) {
|
||||
if ( ( ! $width || ! $height ) && ( 'image/avif' === $this->mime_type || wp_is_heic_image_mime_type( $this->mime_type ) ) ) {
|
||||
$size = wp_getimagesize( $this->file );
|
||||
$width = $size[0];
|
||||
$height = $size[1];
|
||||
|
||||
Reference in New Issue
Block a user