Post

Replies

Boosts

Views

Activity

Safari 17+: Image file got automatically converted to HEIC extension
Issue: The image file mime type got converted to HEIC by Safari To reproduce: Create an HTML file with <input type="file" accept="image/*,image/heic" /> Try to upload a photo with .jpeg or .png Print out the file object The file name would be changed to some temporary name with .heic extension Expected: The conversion should not happen after adding the image/heic to the accept mime type. The accept mine type with image/heic should be allowed and cannot be removed for other modern browsers which do not support .heic. Otherwise, the system browse dialog would disable .heic type. Other findings: If image/heic is removed from the accept mime type, the file object would be printed out as its original extension. It only happens with Safari 17+. Original file object: File: { lastModified: 1702417372000, name: "leo2.jpeg", size: 170584, type: "image/jepg", webkitRelativePath: "" } Converted file object: File: { lastModified: 1702417636000, name: "tempImageHjyd3l.heic", size: 170429, type: "image/heic", webkitRelativePath: "" }
4
1
1.2k
Dec ’23