Screenshot & template-based OG image generation on Cloudflare Workers.
Admin →/template/:nameRenders a saved Satori template to a PNG image. Templates are managed in the admin UI. Results are cached in KV and roll over weekly.
| Param | Default | Description |
|---|---|---|
w | template default | Image width in px (1–4096) |
h | template default | Image height in px (1–4096) |
dpr | 2 | Device pixel ratio (1–3). Higher = sharper on retina screens. |
digest | ISO week | Cache key version string. Pass any value to pin a specific render; omit to auto-bust weekly. |
force | — | Set force=1 to skip the cache and re-render immediately. |
| + template params | — | Any additional query params are passed through to the template as variables. Required params are defined per-template. |
GET/template/my-template?title=Hello+World&author=Jane
Missing a required param returns 400 with usage instructions for that template.
/renderNavigates a full headless Chrome to any URL and returns a screenshot. Backed by Cloudflare Browser Rendering.
| Param | Default | Description |
|---|---|---|
url * | — | Target URL to screenshot (required). |
w | 1440 | Viewport width in px (1–4096) |
h | 788 | Viewport height in px (1–4096) |
dpr | 2 | Device pixel ratio (1–3) |
format | jpeg | Output format: jpeg, png, or webp |
selector | — | CSS selector to clip the screenshot to a single element. |
digest | ISO week | Cache key version string. Omit for weekly auto-bust. |
force | — | Set force=1 to bypass the cache. |
scheme | — | Override URL scheme (e.g. https). |
| extra params | — | Any other params are forwarded as query params to the target URL. |
GET/render?url=https://example.com&format=png&w=1200&h=630
GET/render?url=https://example.com&selector=.og-card