Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable HEIF image uploads #8355

Open
goobertron opened this issue Jun 21, 2022 · 8 comments
Open

Enable HEIF image uploads #8355

goobertron opened this issue Jun 21, 2022 · 8 comments

Comments

@goobertron
Copy link

Please add HEIF to the list of image formats that can be uploaded to posts. Thank you!

@tclaus
Copy link
Member

tclaus commented Jun 22, 2022

heif or heic images must then converted by the backend to a supported image format. Heif is not a format supported by browser engines:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#supported_image_formats

@SuperTux88
Copy link
Member

it would need to be processed on the server anyway to get the different sizes, but it's also not supported by all servers (I don't know if that's because it's a proprietary format, or if there are other reasons for that) ... so at least at the moment it's not that easy to support.

@goobertron
Copy link
Author

Thanks, both. I'd hoped this would be a really simple addition. I'll leave the ticket open in case anyone feels like taking this on in the future – as long as you don't think it would hamper server performance.

@denschub
Copy link
Member

Just for the record,

I don't know if that's because it's a proprietary format, or if there are other reasons for that

ImageMagick supports HEIF if libheif is installed. A package is available on Debian since Buster, and on Ubuntu since Bionic, so it would not be unreasonable to add it as a dependency, imho.

(it's also not proprietary. :))

@SuperTux88
Copy link
Member

At least for Ubuntu bionic I only find guides which include compiling imagemagick yourself, so I thought it's not just enough to install the lib? But maybe these guides are wrong? Later version seem to support it out of the box.

@denschub
Copy link
Member

Uh, okay, I actually don't know if there are any additional dependencies, like a minimal required ImageMagick version. The IM website just says "it's supported", but not since when. If it's not supported in at least Focal, than yeah, this might simply not be realistic at the moment.

@SuperTux88
Copy link
Member

I guess the lib needs to be installed at build time so it can link against it, that's why newer versions have it as hard dependency and then it's supported, older Ubuntu versions don't have it as dependency and that are also the ones with guides that describe recompiling imagemagick after installing the lib.

@denschub
Copy link
Member

Yeah that makes total sense. I'm not entirely sure why I didn't check the build configs for the packages in question. Looking at the Changelog of the Debian package, I found this change from 2018:

imagemagick (8:6.9.10.23+dfsg-1) unstable; urgency=high

[...]

  • Enable HEIF/HEIC image format support (Closes: #914120).
  • Enable WEBP image format (Closes: #806425, #912777)

ImageMagick 6.9.10.23 or newer is in Ubuntu since Focal, and in Debian since Buster.

Debian Stretch is pretty close to EOL, but unfortunately Bionic is still supported. Requiring Ubuntu Focal or newer might be reasonable, but I'm not going to make that call. I'd tend towards being fine with that, especially since the same release also enables WebP, and diaspora* could gain a lot by converting to WebP instead of JPEG...

tclaus added a commit to tclaus/diaspora that referenced this issue Jun 28, 2022
Converting all uploaded images to the webp format. Adding heic to the list of supported file formats for post images
tclaus added a commit to tclaus/diaspora that referenced this issue Jun 28, 2022
Converting all uploaded images to the webp format. Adding heic to the list of supported file formats for post images
tclaus added a commit to tclaus/diaspora that referenced this issue Jun 29, 2022
Converting all uploaded images to the webp format. Adding heic to the list of supported file formats for post images
tclaus added a commit to tclaus/diaspora that referenced this issue Jul 1, 2022
Converting all uploaded images to the webp format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants