serverless-opengraph-image-generator
serverless-opengraph-image-generator copied to clipboard
Generate OpenGraph images for your blogposts on-demand using Serverless
Serverless OpenGraph Image Generator
Usage
-
Open
index.htmland edit it as you like. -
Run:
yarn predeploy # Will clone latest chromium and zip it for AWS Lambda Layer
sls deploy # Deploy Serverless stack and push Lambda layer with Puppeteer
curl <DEPLOYED_ENDPOINT>?title=This is awesome!
By default, Puppeteer will render index.html file but you can also use template parameter to open another HTML file, like so:
https://5618scdg33.execute-api.us-east-1.amazonaws.com/dev/screenshot?template=twiddb.html?title=ANOTHER%20TEMPLATE
Todo
- [x] Caching in Lambda's memory
- [x] Caching in S3
Author
👤 Dynobase
Show your support
Give a ⭐️ if this project helped you!