[wp-trac] [WordPress Trac] #62272: Error when uploading .heic image
WordPress Trac
noreply at wordpress.org
Fri Oct 25 04:28:06 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: needs-patch | Focuses:
--------------------------+---------------------
Comment (by azaozz):
Started on a patch. Seems there are few irregularities here :)
There may be four file extensions corresponding to the four mime types:
.heic, .heif, .heics, and .heifs. However wasn't able to find any samples
with .heics and .heifs extensions. On the opposite, the samples of
animated images were all with .heic extensions.
Also was able to find a lot of .heic images, and a few .heif. However some
of the .heic images have mime type of `image/heif`, both as returned by
`finfo_file()` and looking at Mac's Preview app.
Seems images with all four mime types can have a .heic file extension and
(seemingly) that may be preferred and/or is not considered an error.
Wondering how to handle this in WordPress. Couple options:
1. When uploading rename images with the `image/heic`, `image/heif`,
`image/heic-sequence`, `image/heif-sequence` mime types to have `.heic`
file extension. As far as I see most already have it. This seems somewhat
more compatible with similar images that are available on the internet at
this time.
2. Rename .heic and .heif images according to their mime type. Seems that
will change many .heic images to .heif. Also rename images with `image
/heic-sequence` and `image/heif-sequence` mime types to .heic and .heif
regardless of the existing extension.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62272#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list