3

Trying to convert HEIC images to JPEG

I am working with Firebase functions when a new image is uploaded to the Firebase Storage.

It works when I run a test function locally in the firebase emulator, but fails when I try to run it on my Firebase project.

I realised my emulator is using ImageMagick 7.0.9-7 but my Firebase instance is using ImageMagick 6.9.7-4.

How do I upgrade ImageMagick on my Firebase instance?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • You might need to install it as an additional binary, as shown in the links I included in this comment: https://stackoverflow.com/questions/43036268/do-i-have-access-to-graphicsmagicks-or-imagemagicks-in-a-google-cloud-function#comment73181621_43037070 and here https://stackoverflow.com/a/42777596/209103 – Frank van Puffelen Dec 09 '19 at 15:17

1 Answers1

0

Adding Frank van Puffelen's answer as community wiki to improve visibility:

As said in Frank's answer on this thread you can add your own modules by putting them in the same folder as your Cloud Function. In the thread there's a link to Firebase tutorial with sample code on image processing triggered by upload.

In the other link provided there is information about ffmpeg, which is a library with quite a lot of multimedia capabilities, and explanations on how to install it.

You may also take a look at how to manage dependencies in Firebase.

Happy-Monad
  • 1,962
  • 1
  • 6
  • 13