Open Graph images,
from a single URL.
Share-ready 1200×630 cards for your blog posts, projects and
sites. Set a title, pick a theme, and drop the link in your
<head>.
GET /img?title=Hello+World&theme=dark
Design your image
The preview updates as you type.
A simple API. No key required.
Pass query parameters, get an image back. Use the URL directly in your Open Graph metadata.
/img
Recommended
Generates an image directly and returns SVG with a 1200×630 viewBox. Use this one in your HTML metadata.
/
Shows this page when no parameters are given. If title is present, the root URL returns an image instead.
Query parameters
All parameters are optional. Values should be URL-encoded.
| Parameter | Description | Default |
|---|---|---|
title | Main headline. Up to 160 characters. | Hello World! |
description | Supporting text. Up to 240 characters. | Default description |
brand | Brand name shown in the header and footer. | msar.me |
theme | dark or light image theme. | dark |
bg | random/<topic> for a random Unsplash photo on that topic (e.g. random/nature; plain random uses technology), or an HTTP(S) image URL for a custom background. | gradient |
Caching
Images ship with Cache-Control headers for seven days.
The Worker Cache API reuses responses within the same Cloudflare
data center, and each distinct query string gets its own entry.
Good to know
- Image format. The Worker currently returns SVG. Some social platforms need PNG or JPEG for reliable previews.
- Custom backgrounds. The SVG renderer references remote images, which some crawlers won't load. Use server-side compositing when the background must always render.