Make WordPress Core


Ignore:
Timestamp:
10/29/2024 01:11:00 AM (5 months ago)
Author:
azaozz
Message:

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.

File:
1 edited

Legend:

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

    r59247 r59315  
    272272         * are properly sized without affecting previous `getImageGeometry` behavior.
    273273         */
    274         if ( ( ! $width || ! $height ) && ( 'image/avif' === $this->mime_type || 'image/heic' === $this->mime_type ) ) {
     274        if ( ( ! $width || ! $height ) && ( 'image/avif' === $this->mime_type || wp_is_heic_image_mime_type( $this->mime_type ) ) ) {
    275275            $size   = wp_getimagesize( $this->file );
    276276            $width  = $size[0];
Note: See TracChangeset for help on using the changeset viewer.