I don't know if this is technically possible at this moment, it would be nice if sharp would one day support HEIF format which is now a default image format on latest iPhones.
References:
Hello, please see https://github.com/jcupitt/libvips/issues/671
Hi @lovell, I've just noticed GitHub issues are no longer accessible under libvips. Does this mean we won't get support for .heic files in a foreseeable future?
PS Thanks for your amazing work on Sharp!
@chris-kobrzak libvips moved to its own org (but it looks like he then forked it back to his account?), so there isn't a redirect. The issue is here: https://github.com/libvips/libvips/issues/671
@lovell They already made a new issue addressing only some issues with autorotate. Seems like libvips is now compatible with HEIC. libvips/libvips#1247
The forthcoming libvips v8.8.0 will add support for libheif. There will probably be a few changes required in sharp to expose the ability to read and write this format.
More importantly, the precompiled binaries provided by sharp will not include libheif so you'll need to compile libvips from source and install it globally. (When the patent-free AVIF format is added to libheif then this might change.)
It seems like libvips v8.8.0 is out. We're wondering if you're planning support for HEIF in the near future?
By the way, we love and appreciate Sharp. Thank you!
any progress on this?
Commit b737d46 adds (highly) experimental support for reading and writing HEIF images. It will require use with a custom, globally-installed libvips that has itself been compiled with support for libheif.
The prebuilt binaries provided by sharp will not include libheif (and will never include HEVC-related logic whilst it is patent-encumbered).
maybe it's worth to make a guide or at least provide some links
sharp v0.23.0 is now available.
This will require use of sharp with a custom installation of libvips compiled with support for libheif etc.
The prebuilt binaries will not include any support for HEIC.
https://libvips.github.io/libvips/install.html#building-libvips-from-a-source-tarball
@lovell Do you have a feel for how lack of heic support is affecting the web dev world? I find it really surprising / confusing / unsurprising that Apple has basically thrown a wrench into every website's image upload portal and there doesn't seem to be a great, robust solution. Have you noticed any common workarounds like simply notifying the user that they need to convert the heic image to a still before uploading?
I can't believe that Apple also is ignoring the allowed image type in the browser file inputs and forcing heic into input fields that were only supposed to include jpeg.
Are devs up in arms at apple over this?
Thanks for your work on this!
@ajhool Apple are a founding member of AOM so are well-placed to switch from HEIC to the royalty-free AVIF and prevent their customers from experiencing the problems you describe.
I installed libvips on macOS with brew install libvips. I then installed sharp with yarn add sharp. When I tried operating on an HEIC file, it failed with unsupported format. Then I removed node_modules/sharp/vendor, and tried again, and it worked. How can I make the install process find the globally installed libvips? It's found at runtime, but not at install.
Thank you!
EDIT: Posted to SO https://stackoverflow.com/questions/61903049/how-can-i-use-a-globally-installed-libvips-with-sharp-on-macos.
@dminkovsky The output of npm install sharp logs all decisions made about global vs vendored libvips. Please open a new installation issue if you're still having problems detecting a globally-installed libvips.
Most helpful comment
The forthcoming libvips v8.8.0 will add support for libheif. There will probably be a few changes required in sharp to expose the ability to read and write this format.
More importantly, the precompiled binaries provided by sharp will not include libheif so you'll need to compile libvips from source and install it globally. (When the patent-free AVIF format is added to libheif then this might change.)