[wp-trac] [WordPress Trac] #62272: Error when uploading .heic image

WordPress Trac noreply at wordpress.org
Fri Oct 25 19:07:21 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 ironprogrammer):

 For HEIC images I've tested from my iPhone (going back to 2017), they're
 all `.HEIC` (capitalized) and mime `image/heic`. Because the presumptive
 use case of [https://core.trac.wordpress.org/ticket/53645 HEIC support in
 WordPress] is to help iOS users, perhaps supporting the other
 "questionable" mime variations can be shelved until they become more
 widely adopted?

 But I agree it would help to at least add support for `image/heif`, as
 originally reported for this ticket, since that seems to be a common mime
 for sample spec images. A `.heic` file returning `image/heif` should be
 considered valid.

 In response to @azaozz:

 > 2. Rename .heic and .heif images according to their mime type...

 I don't think original uploads should be renamed to match the mime. The
 HEIC designation hints that the file has a HEVC encoded image (like
 attachment:sample1.heic), which is valid as `image/heif`. Let's leave the
 original files alone.

 > Also rename images with `image/heic-sequence` and `image/heif-sequence`
 mime types to `.heic` and `.heif` regardless of the existing extension.

 As a side note, while chatting with @azaozz about sequence/burst images,
 we found that ImageMagick (`magick` CLI) grabs the first frame when
 converting to JPEG, so seems to work okay at a glance. However, for lack
 of finding a real-world use case for this, I think supporting sequences
 should wait until there's a defined need.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62272#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list