comeon-group / image-optimization

creates multiple resized and optimised JPEG, WEBP and PNG images from source bucket and puts them to resized bucket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image-Optimization

The code will generate below formats

jpg
png
webp

and sizes

640px, 480px, 420px, 360px, 300px, 240px, 180px, 140px

of an image

How to run locally

npm install

npm run test

Build for AWS

npm install
rm -rf node_modules/sharp
npm install --arch=x64 --platform=linux sharp

Create a zip file and upload to lamda

zip -r image-optimization.zip index.js config.js package.json node_modules

About

creates multiple resized and optimised JPEG, WEBP and PNG images from source bucket and puts them to resized bucket


Languages

Language:JavaScript 95.2%Language:Makefile 2.4%Language:Shell 2.4%