[wp-trac] [WordPress Trac] #62272: Error when uploading .heic image
WordPress Trac
noreply at wordpress.org
Tue Oct 22 00:23:57 UTC 2024
#62272: Error when uploading .heic image
--------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+---------------------
Comment (by azaozz):
The 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.
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?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62272#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list