OG Shot Worker

Screenshot & template-based OG image generation on Cloudflare Workers.

Admin →

Template renderer — /template/:name

Renders a saved Satori template to a PNG image. Templates are managed in the admin UI. Results are cached in KV and roll over weekly.

ParamDefaultDescription
wtemplate defaultImage width in px (1–4096)
htemplate defaultImage height in px (1–4096)
dpr2Device pixel ratio (1–3). Higher = sharper on retina screens.
digestISO weekCache key version string. Pass any value to pin a specific render; omit to auto-bust weekly.
forceSet force=1 to skip the cache and re-render immediately.
+ template paramsAny 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.

Browser screenshot renderer — /render

Navigates a full headless Chrome to any URL and returns a screenshot. Backed by Cloudflare Browser Rendering.

ParamDefaultDescription
url *Target URL to screenshot (required).
w1440Viewport width in px (1–4096)
h788Viewport height in px (1–4096)
dpr2Device pixel ratio (1–3)
formatjpegOutput format: jpeg, png, or webp
selectorCSS selector to clip the screenshot to a single element.
digestISO weekCache key version string. Omit for weekly auto-bust.
forceSet force=1 to bypass the cache.
schemeOverride URL scheme (e.g. https).
extra paramsAny 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