strapi-community / strapi-plugin-local-image-sharp

Dynamically resize, format and optimize images based on url modifiers.
https://strapi-community.github.io/strapi-plugin-local-image-sharp/
65 stars 17 forks source link

heifsave_buffer not found while running in Docker #31

Open dandry opened 1 year ago

dandry commented 1 year ago

Hello, first of all I'd like to thank all the contributors involved in this project. It is great.

I've found an issue with running the plugin in Docker container. During an attempt to transform given asset on request, the following error occurs:

debug: IPX Error (VipsOperation: class "heifsave_buffer" not found)

This happens when you build your Strapi Docker image using the following sample production Dockerfile.

For the runtime image (node:16-alpine), vips-dev is already being installed, however vips-heif is also required to make the plugin work. Then, the RUN docker statement should look like this:

FROM node:16-alpine
RUN apk add --no-cache vips-dev vips-heif

Adding this issue so it hopefully helps others facing the same problem. Can be closed right away 🙂

winston0410 commented 11 months ago

hey @dandry you are the man, thanks for this solution