Closed Cruaier closed 6 months ago
Yes, I am using the latest version in production. Since the error message mentions an unsupported image format I'd need to have the original image file to be able to test
I used the test file you provided in this repository. Are you willing to share your Lambda layer artifact with me? I am attaching mine for reference if you want to have a look: https://we.tl/t-WGA5jgpGFc
I can confirm that it does not actually work. My tests were running against an old version.
I thought it might be the missing x265 which I added in 4.1.0 but it still doesn't work. No idea why. vips 8.15.2 is compiled with libheif HEIC/AVIF load/save with libheif : YES (dynamic module: YES)
and sharp detects the lib
sharp: Detected globally-installed libvips v8.15.2
sharp: Attempting to build from source via node-gyp
sharp: Found node-addon-api
sharp: Found node-gyp version 10.1.0
The compilation itself works; you can test it e.g. inside the build docker container without issues (both sharp and vips). I assume the issue is with the packaging. If I have more time I'll investigate further.
@zoellner I think the issue for you might be the same as in my script; the preset for libheif has to be changed during the compilation to "release-noplugins" in order to create a static build.
You can also have a look at my code for the sharp-heif layer here: https://github.com/Dobe-Solutions/sharp-heif-lambda-layer
Thank you. will give that a try
Had to make a few more tweaks but seems to work now. Thanks again for debugging
Hi there,
I tried out the Lambda layer following your build script but I am getting an error running the example code of this repository:
The steps I did for the build were:
sam build --use-container --build-image public.ecr.aws/sam/build-nodejs20.x:latest
- zip the build output and load it into a Lambda layer; create a Lambda function with the content of the examples layer and test it. I have a very similar build script for building a Lambda layer which also doesn't work for me (see ticket https://github.com/lovell/sharp/issues/4081).Do you was able to test the Lambda layer with the latest versions?