gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Image block: Drag-and-drop allows HEIC files

Open sixhours opened this issue 5 years ago • 2 comments

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:
Screen Shot 2021-08-19 at 11 35 52 AM
  • 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:
Screen Shot 2021-08-19 at 12 46 49 PM

Step-by-step reproduction instructions

  1. Open a new post or page
  2. Add an Image block
  3. Upload an HEIC image file (from an Apple device like iPhone) by dragging and dropping it into the Image block area
  4. 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.

sixhours avatar Aug 19 '21 17:08 sixhours

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.

lwangdu avatar Aug 19 '21 23:08 lwangdu

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.

Mamaduka avatar Jul 17 '24 05:07 Mamaduka