A serverless app created with SST that dynamically generates social share or Open Graph (OG) images.
Read the guide on how this service is configured and how you can create your own — Dynamically generate social share images with serverless.
You can also reference the example on using the Chromium Lambda Layer.
Start by installing the dependencies.
$ npm installInstall the @sparticuz/chromium layer.
$ cd layers/chromium && npm installThen start the Live Lambda Development environment.
$ npx sst startThe templates to generate the share images are stored in templates/. And all the non-Latin fonts are placed in .fonts/.
Deploy your service to prod by running.
$ npx sst deploy --stage prodTo clear the cache of generated images, invoke the clear-cache.handler with the following payload.
{"path":"<template-name>/"}