About this product
Every page on your site has a social preview. About 5% of them look good. The rest are generic, blurry, or missing entirely. Building dynamic OG images the right way means wiring up @vercel/og, learning Satori's CSS subset, hand-designing every template, validating params, bundling fonts, setting caching headers, and building a preview UI so you can QA the renders. That's two days you don't have. This boilerplate gives you all of it in 15 minutes.
What you get
A complete, runnable Next.js 15 + TypeScript project that:
- Exposes
/api/og/[template] — a query-param-driven endpoint that returns a 1200×630 PNG rendered from a React template by @vercel/og. Hit it from your og:image meta tag; every page gets a unique, beautiful preview.
- Ships 50 visually distinct templates across 12 categories — blog posts, product launches, SaaS, podcast episodes, courses, social quotes, events, e-commerce, GitHub repos, docs pages, newsletters, and clean generic fallbacks. Each is a plain React component you can customize.
- Includes a
/preview page — a clean UI where you select any template, fill in the params via a form, see the actual server-rendered image live, and copy the final URL. Essential for QA. Useful for showing clients.
- Handles the parts everyone gets wrong — correct Satori-safe JSX patterns, font bundling, parameter validation via zod, type-safe template registry, and the right caching headers (immutable for parameterized requests; short-lived for defaults).
- Deploys cleanly to Vercel (the recommended path, since
@vercel/og is theirs) — and to any Node.js host with no code changes.
The 50 templates
Blog Post (5) · Classic, Bold, Magazine, Minimal, Card
Product Launch (5) · Spotlight, Logo+Tag, Announcement, Feature Strip, Card
SaaS / App (5) · Hero, Feature Bullets, Pricing, Changelog, Status
Podcast (4) · Classic, Square Art, Quote, Show
Course (4) · Lesson, Banner, Progress, Instructor
Quote (4) · Classic, Card, Avatar, Bold
Event / Webinar (4) · Date Block, Banner, Conference, Webinar
E-commerce (4) · Product, Sale, Collection, 5-Star
GitHub (4) · Repo, Release, Issue, Readme
Docs / API (4) · Page, API Endpoint, Tutorial, Reference
Newsletter (3) · Issue, Recap, Feature
Generic (4) · Brand, Headline, Twitter Card, Promo
Adding your own template takes about 10 minutes
Each template is a plain React/JSX component plus a small declaration of its slug, name, param schema, and defaults. The README walks through it end-to-end — drop a file in templates/, register it, and it appears in the preview UI and the API. The included defineTemplate() helper means each new template is around 30 lines of code.
Who it's for
- Indie hackers and small teams running Next.js sites who want production OG images without spending two days on infrastructure.
- Agencies shipping client work who need a customizable starting point per project.
- Anyone who's tried to build OG images with
@vercel/og from scratch, hit a Satori CSS-subset error, and decided they had better things to do.
What you don't get to skip with this
You still need to deploy it (Vercel recommended) and update your og:image meta tags to point at the new endpoint. Both are covered step-by-step in SETUP.md. After that you're done — caching is automatic, the endpoint is immutable per-URL, and a single deploy renders OG images for your entire site.
What's included
- Complete Next.js 15 + TypeScript boilerplate
- 50 professionally designed OG image templates (12 categories)
- Dynamic /api/og/[template] endpoint — URL-param driven, 1200×630 PNG output
- Live preview page with template picker, dynamic form, and Copy URL action
- Correct Satori-safe JSX patterns and bundled fonts (DejaVu Sans)
- Type-safe template registry with zod-validated query params
- Cache-Control headers (immutable when parameterized, short TTL on defaults)
- Vercel-ready (vercel.json included) + works on any Node.js host
- Walkthrough README and SETUP.md (deploy + custom domain + adding templates)
- Commercial license — unlimited personal + client / agency use