aws-samples / image-optimization

Simple, performant and cost efficient solution for optimizing images using Amazon CloudFront, Amazon S3 and AWS Lambda
MIT No Attribution
172 stars 106 forks source link

Pin Sharp for Node 16 compatibility. #26

Closed johnnyleitrim closed 6 months ago

johnnyleitrim commented 6 months ago

Description of changes:

The latest version of the Sharp JS library does not support Node 16. This PR pins the Sharp library to the last version that supported Node 16, so that it can be deployed as-is.

Also removed the Sample Website deployment, as it is not necessary for the image optimization stack.

piotrekwitkowski commented 6 months ago

Hi, thanks for creating the pull request!

@achrafsouk included your suggestion and made the Sample Website deployment optional and by default disabled, please see https://github.com/aws-samples/image-optimization/commit/44d14816ef9f9d7e530b19a9e0133eaac85385f1.

I have updated the solution to use Node v20 runtime and AWS SDK v3 in https://github.com/aws-samples/image-optimization/commit/9f04adf5f32520ba6a3057b2ef3337d5c608e0da. I have checked and it worked with latest sharp available currently (0.33.2), so for now we won't be pinning the specific version.