HEIC image support in Plone

I have a user who has uploaded images in HEIC format to a Plone site and this Plone instance is unable to scale and show those images.

Do you know if Pillow can handle this kind of images and whether that's enough or we should do some changes in the Plone site?

It appears that Pillow itself cannot handle HEIC/HEIF, but a plugin can. See GitHub issue for an interesting discussion: Support for HEIF · Issue #2806 · python-pillow/Pillow · GitHub. Beware the licensing dragons and "bat-shit insane" implementation.

Alternatively for a site where we use ImageMagick, we had to add a decode delegate.

    # /etc/ImageMagick-6/delegates.xml
    # Add this line under the delegates section
    <delegate decode="heic" command="&quot;heif-convert&quot; &quot;%i&quot; &quot;%o.jpg&quot; ;/bin/mv &quot;%o.jpg&quot; &quot;%o&quot;"/>

Then we can use mogrify to convert it to JPEG.

1 Like

For non Safari browsers, to display them directly you need a viewer, like:

The use case is to store the original image but have the scaled down versions in other formats like jpeg? Or you want to just display the image, thus transforming it after upload in a more suitable format?

I would like Plone to handle this kind of images like any other image: add to Plone, scale and show it.

But these licensing and patent issues are insane.

I will manually open the heic files with GIMP, save them to JPG and upload again.

Thanks,

m.