widdix / static-website-img-optimize

Static Website: Image optimization for https://templates.cloudonaut.io/en/stable/static-website/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Static Website: Image optimization

Works together with https://templates.cloudonaut.io/en/stable/static-website/

Optimizes .png, .jpg, and .jpeg images and enerates .webp images at the edge.

Installation Guide

Requires Node.js v10!

cd lambda-src
docker run --rm -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm ci --production
cd ..
aws --region us-east-1 cloudformation package --s3-bucket $BUCKET_NAME --template-file lambdaedge-img-optimize.yaml --output-template-file .lambdaedge-img-optimize.yaml
aws --region us-east-1 cloudformation deploy --template-file .lambdaedge-img-optimize.yaml --stack-name lambdaedge-img-optimize --capabilities CAPABILITY_IAM

Copy the OriginRequestLambdaEdgeFunctionVersionARN output of the stack and use it with static-website/static-website.

About

Static Website: Image optimization for https://templates.cloudonaut.io/en/stable/static-website/


Languages

Language:JavaScript 100.0%