Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

widdix/static-website-img-optimize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Sponsor this project

Packages

No packages published