Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #62272, comment 1


Ignore:
Timestamp:
10/22/2024 12:30:16 AM (7 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #62272, comment 1

    initial v1  
    11The error seems to be in `wp_check_filetype_and_ext()`. It [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/functions.php#L3151 uses] `finfo_file()` to get the `$real_mime` which is returned as `image/heif`. However that mime type is treated as unsupported, only `image/heic` is supported.
    22
    3 Seems the fix can be as easy as mapping `image/heif` to `image/heic` in `wp_check_filetype_and_ext()`. However wondering if adding `image/heif` to the supported image mime types may be a better idea?
     3Seems the fix can be as easy as mapping `image/heif` to `image/heic` in `wp_check_filetype_and_ext()`:
     4{{{
     5if ( 'image/heif' === $real_mime ) {
     6        $real_mime = 'image/heic';
     7}
     8}}}
     9
     10
     11However wondering if adding `image/heif` to the supported image mime types may be a better idea?