This is the sample code repository for my explanation article about image resizing and compression for websites.
You can find the document here.
The sharp_binaries folder contains pre-compiled binaries for Sharp.js version 0.30.7 on x86_64 architecture.
The cdn_code folder contains a sample function for enabling CDN distributions to send Content-Disposition HTTP headers with image files in specific situations, to allow download behaviour.
The serverless_code folder contains sample code for resizing an image via Sharp.js on AWS Lambda.