Skip to content

Dynobase/serverless-opengraph-image-generator

Repository files navigation

Serverless OpenGraph Image Generator

Demo - Click

Usage

  1. Open index.html and edit it as you like.

  2. 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

  • Caching in Lambda's memory
  • Caching in S3

Author

👤 Dynobase

Show your support

Give a ⭐️ if this project helped you!

Releases

No releases published

Packages

No packages published