gutenberg
gutenberg copied to clipboard
Image block: Drag-and-drop allows HEIC files
Description
What I expected:
- When I try to upload an HEIC file to an Image block via drag and drop, it will fail, or at least show a message letting me know HEIC is not supported.
What happened:
- When I upload an HEIC file to an Image block using drag and drop, the upload goes through, and the image is shown broken with no context:
- When I upload an HEIC file via any other method (through the Media Library, for example), I'm either unable to select it, or I get a notice like this one:
Step-by-step reproduction instructions
- Open a new post or page
- Add an Image block
- Upload an HEIC image file (from an Apple device like iPhone) by dragging and dropping it into the Image block area
- The image appears broken in the editor with no warning about HEIC image types
Screenshots, screen recording, code snippet
https://user-images.githubusercontent.com/2124984/130111550-cfd863e6-6710-4e74-8fff-b5493aa24b89.mov
Environment info
- WP 5.8, default theme
- Chrome, Safari, Firefox, Mac OS 11.5
Pre-checks
- [X] I have searched the existing issues.
- [X] I have tested with all plugins deactivated except Gutenberg.
WP doesn't support dot HEIC image extension. Only support .jpg, gif. peng, webp images extension. If that is photo, you should convert to jpg.
There's a proposal to auto-convert HEIC images during the upload - https://core.trac.wordpress.org/ticket/53645.
I'll close the issue here as it will be resolved in WP core.