Next.jsReactTool Site

ogimage — Next.js Tool Template

By Illyism

ogimage is the complete open-source codebase for ogimage.org, built on Next.js and Satori, offering an OG image generator, nine templates, an Open Graph checker, and a gallery of 380+ real examples.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-08View source

What stands out

A quick read of the recorded project description.

01

Provides a browser-based OG image generator: enter a title, choose colors, and download a 1200×630 PNG

02

Includes nine template routes built on next/og ImageResponse and Satori that can be copied directly into a Next.js app

03

Contains an Open Graph checker for inspecting a URL's og tags, image dimensions, and link preview

04

The gallery collects 380+ real OG image examples, displayed by category and managed as a git CMS

05

Does not rely on a hosted API or database; main features work locally without any keys

06

The code is MIT-licensed and can be self-hosted, modified, and used commercially

Template Details

ogimage is the complete source repository for ogimage.org. Centered on Open Graph images (og:image), the preview images shown when links are shared, it provides four tools: a browser-based OG image generator (enter a title, choose colors, download a 1200×630 PNG), nine ImageResponse template routes that can be copied into a Next.js app, a checker that inspects a URL's Open Graph tags and image dimensions, and a categorized gallery of 380+ real OG image examples.

Technically, the project uses Next.js's next/og module to output ImageResponse, with Satori rendering JSX and Tailwind classes passed via the tw prop. Templates live in app/og/templates/ and cover nine card types: headline, blog-post, screenshot, phone, button, emoji, icon, image, and city. The generator additionally uses app/og/generator/route.tsx and supports title, subtitle, site, layout, bg, and accent parameters.

The gallery uses a git CMS model: each site consists of two files, content/gallery/{domain}.json and public/og/{domain}.{ext}. The gallery:add script adds entries, and gallery:find automatically fetches and filters candidate sites.

The project does not rely on a hosted API or database. Local development requires Bun; after installation, run bun dev to use the generator, templates, checker, and gallery without any keys. The screenshot templates and the city template depend on SCREENSHOT_API_URL/SCREENSHOT_API_KEY and UNSPLASH_KEY respectively; without configuration, the screenshot templates show a placeholder image. The design scoring in gallery:find depends on ANTHROPIC_API_KEY. Email subscriptions, PostHog, and Plausible analytics are all optional; Plausible sends data only when the site runs on ogimage.org. For production deployment, use the Dockerfile at the repository root; the image is based on Next.js's output: 'standalone'. The code is MIT-licensed and can be self-hosted, modified, and used commercially; images in the gallery belong to their respective sites and are shown as examples only, and third-party assets must be checked against their own licenses.

Next.jsReactTool site

Is it right for your project?

Use Cases

  • Generate consistent 1200×630 Open Graph share images for multiple pages of a website
  • Integrate ImageResponse routes into a Next.js project and point og:image to dynamically generated images
  • Check whether existing pages' Open Graph tags and image dimensions meet share preview requirements
  • Browse real product OG image examples to find references for designing your own share cards
  • Self-host a complete site containing the generator, templates, checker, and gallery

Suitable For

  • Developers who need to configure or batch-generate og:image for a site
  • Front-end teams using Next.js who want to generate share images in code
  • Teams that want to self-host an OG image tool site without relying on an external hosted API
  • Designers and content staff who need references from real OG image design examples

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Local development requires Bun: clone the repository, run bun install, copy .env.example to .env, then run bun dev

  2. 2

    The generator, templates, checker, and gallery run without any keys

  3. 3

    The screenshot templates require SCREENSHOT_API_URL and SCREENSHOT_API_KEY, and the city template requires UNSPLASH_KEY; without configuration, the screenshot templates show a placeholder image

  4. 4

    The design scoring in gallery:find depends on ANTHROPIC_API_KEY; email subscriptions and PostHog analytics are optional

  5. 5

    For production deployment, use the Dockerfile at the repository root; the image is based on Next.js's output: 'standalone'

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version in the public repository under the MIT license; the free scope is the code of that version and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, use commercially, and distribute the code of this version for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their own licenses; the code's MIT license alone cannot be used to judge them.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
  • The gallery:find automatic filtering feature relies on Anthropic's Claude service for design scoring and requires ANTHROPIC_API_KEY to use; without a configured key, the script cannot complete scoring and automatic addition.
  • The screenshot templates require environment variables for a screenshot service (SCREENSHOT_API_URL and SCREENSHOT_API_KEY) to capture live pages; without configuration, the templates only show a placeholder image.
  • The city template relies on the Unsplash service to fetch city photos and requires the UNSPLASH_KEY access key; without configuration, it cannot generate city images for that template.
  • When screenshot-related environment variables are not set, the screenshot and phone templates do not generate real page screenshots but output placeholder images, limiting functionality.
  • Plausible analytics sends data only when the site runs on the ogimage.org domain; self-hosted or forked deployments send no analytics data by default, and if analytics are needed, you must modify the host and domain in app/layout.tsx yourself.
  • The copyright of OG images in the gallery belongs to their respective sites; they are shown as examples only and are not licensed together with the MIT code license. Reusing these images requires separately confirming authorization from each site.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

`gallery:find` fetches each site, rejects images with the wrong size or ratio, and asks Claude to score the design from 1 to 10.

Original README

| `screenshot` | Live page capture in a frame (needs the screenshot API env) |

Original README

| `city` | Geo-located city photo (needs `UNSPLASH_KEY`) |

Original README

Without the screenshot variables, the screenshot templates show a placeholder image.

Original README

Plausible page views are sent only when the site runs on `ogimage.org`. A fork sends nothing.

Original README

The gallery images belong to their sites and are shown as examples.

Original README
https://github.com/Illyism/ogimage/blob/main/LICENSE.mdhttps://github.com/Illyism/ogimage/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-08. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 85 / 100
Technologies
Next.js · React
Website type
Tool Site
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-10-08
Screenshot last checked
2026-10-08

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-08

Inspect the recorded source material

SHA-256: 763e584a0de7ff597b755f0ec168d68297ce91afdded056d71f4b41bafdaa033

2026-10-08T08:01:38.593Z

Source file / repository
# OG Image: open-source generator, templates, checker, and gallery

Make an **OG image** (Open Graph image) for every page of your site. This repo is the full source of [ogimage.org](https://ogimage.org): a free OG image generator, nine Next.js + Satori templates, an Open Graph checker, and a gallery of 380+ real OG image examples.

<p align="center">
  <a href="https://ogimage.org">
    <img src=".github/social-preview.png" alt="OG image generator and gallery by ogimage.org" width="800" />
  </a>
</p>

No hosted API. No database. MIT license. Clone it, self-host it, and ship your own images.

| Tool | What it does | Live |
| --- | --- | --- |
| **OG image generator** | Type a title, pick colors, download a 1200×630 PNG | [ogimage.org/generator](https://ogimage.org/generator) |
| **OG image templates** | Nine `ImageResponse` routes you can copy into a Next.js app | [ogimage.org/templates](https://ogimage.org/templates) |
| **OG image checker** | Tests the Open Graph tags, image size, and link preview of a URL | [ogimage.org/checker](https://ogimage.org/checker) |
| **OG image gallery** | 380+ real OG image examples from live startups, by category | [ogimage.org/inspiration](https://ogimage.org/inspiration) |

## What is an OG image?

An OG image is the picture that X, Facebook, LinkedIn, Slack, Discord, WhatsApp, and iMessage show when someone shares a link. One meta tag sets it:

```html
<meta property="og:image" content="https://your-domain.com/og/home.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
```

The standard **OG image size is 1200×630 pixels** (ratio 1.91:1), as PNG or JPEG, below 1 MB.

Guides: [What is an OG image?](https://ogimage.org/what-is-an-og-image) · [OG image size](https://ogimage.org/og-image-size) · [og:image meta tag](https://ogimage.org/og-image-meta-tag) · [Next.js OG image](https://ogimage.org/nextjs-og-image) · [Open Graph tags](https://ogimage.org/open-graph-tags)

## Quick start

Requires [Bun](https://bun.sh).

```bash
git clone https://github.com/Illyism/ogimage.git
cd ogimage
bun install
cp .env.example .env
bun dev
```

Open [http://localhost:3000](http://localhost:3000). The generator, the templates, the checker, and the gallery run without any keys.

## Generate an OG image in Next.js

Each template is a route handler that returns a 1200×630 PNG through `next/og` `ImageResponse`. Satori renders the JSX. Tailwind classes go in the `tw` prop.

```tsx
// app/og/route.tsx
import { ImageResponse } from 'next/og'
import type { NextRequest } from 'next/server'

export async function GET(request: NextRequest) {
  const title = request.nextUrl.searchParams.get('title') ?? 'Hello'

  return new ImageResponse(
    <div tw="flex h-full w-full items-center justify-center bg-black p-20 text-7xl font-bold text-white">
      {title}
    </div>,
    { width: 1200, height: 630 },
  )
}
```

Point `og:image` at the route:

```tsx
export const metadata = {
  metadataBase: new URL('https://your-domain.com'),
  openGraph: { images: ['/og?title=Launch%20week'] },
  twitter: { card: 'summary_large_image' },
}
```

This repo uses [`core/seo.tsx`](./core/seo.tsx) as the metadata helper.

### Included OG image templates

All templates are in [`app/og/templates/`](./app/og/templates/).

| Template | Card |
| --- | --- |
| `headline` | Bold headline block with a call to action |
| `blog-post` | Title, excerpt, and author (`?title=`, `?excerpt=`, `?author=`) |
| `screenshot` | Live page capture in a frame (needs the screenshot API env) |
| `phone` | Mobile screenshot mock |
| `button` | Emoji, headline, and a button |
| `emoji` | One emoji on a dark card |
| `icon` | Lucide-style icon |
| `image` | Avatar and name |
| `city` | Geo-located city photo (needs `UNSPLASH_KEY`) |

The generator at `/generator` uses one more route, [`app/og/generator/route.tsx`](./app/og/generator/route.tsx), with `?title=`, `?subtitle=`, `?site=`, `?layout=`, `?bg=`, and `?accent=`.

## OG image gallery

The gallery is a git CMS. One site is two files: `content/gallery/{domain}.json` and `public/og/{domain}.{ext}`.

Add one site:

```bash
bun run gallery:add https://example.com saas productivity
```

Find good cards automatically:

```bash
bun run gallery:find                      # YC companies, newest first
bun run gallery:find --source hn          # popular Show HN launches
bun run gallery:find --file sites.txt     # your list, one URL per line
bun run gallery:find --limit 80 --add 15 --min-score 8 --dry-run
```

`gallery:find` fetches each site, rejects images with the wrong size or ratio, and asks Claude to score the design from 1 to 10. Cards that pass get a name, a description, categories, and colors. It needs `ANTHROPIC_API_KEY`.

Open a pull request with the new files. Details are in [CONTRIBUTING.md](./CONTRIBUTING.md).

## Project layout

| Path | Role |
| --- | --- |
| [`app/og/templates/`](./app/og/templates/) | OG image templates (Satori + Tailwind) |
| [`app/generator/`](./app/generator/) | Browser OG image generator |
| [`app/checker/`](./app/checker/) | Open Graph tag and image checker |
| [`app/inspiration/`](./app/inspiration/) | Gallery, category pages, and post pages |
| [`content/gallery/`](./content/gallery/) + [`public/og/`](./public/og/) | Gallery data and images |
| [`content/pages.json`](./content/pages.json) | Guides and static pages |
| [`scripts/`](./scripts/) | `add-og.ts` and `find-og.ts` |

## Production

### Docker

```bash
docker build -t ogimage .
docker run -p 3000:3000 --env-file .env ogimage
```

Coolify and other hosts can build from the root [`Dockerfile`](./Dockerfile). The image uses Next.js `output: 'standalone'`.

### Checks before you ship

```bash
bun run check   # lint + typecheck
bun run build   # production build
```

## Environment variables

Copy [`.env.example`](./.env.example) to `.env`. All variables are optional for local work.

| Variable | Purpose |
| --- | --- |
| `RESEND_API_KEY` | Resend API key for email signup and gallery suggestions |
| `RESEND_AUDIENCE_ID` | Audience for kit signups |
| `CONTACT_EMAIL` | Reply-to and inbox for gallery suggestions (default: `[email protected]`) |
| `NEXT_PUBLIC_POSTHOG_KEY` | PostHog project key |
| `NEXT_PUBLIC_POSTHOG_HOST` | PostHog ingest host |
| `SCREENSHOT_API_URL` | Base URL for screenshot capture (`screenshot`, `phone` templates) |
| `SCREENSHOT_API_KEY` | API key for that service |
| `UNSPLASH_KEY` | Unsplash access key for the `city` template |
| `ANTHROPIC_API_KEY` | Design review in `bun run gallery:find` |

Without the screenshot variables, the screenshot templates show a placeholder image.

Plausible page views are sent only when the site runs on `ogimage.org`. A fork sends nothing. To use your own Plausible site, change the host and the domain in [`app/layout.tsx`](./app/layout.tsx).

## FAQ

**What size must an OG image be?**
1200×630 pixels. See the [OG image size guide](https://ogimage.org/og-image-size).

**Can I use this without Next.js?**
Yes. Deploy this repo and point the `og:image` tag of any site at a template URL. Or use the [generator](https://ogimage.org/generator) and upload the PNG.

**How do I test my OG image?**
Paste the URL of your page into the [OG image checker](https://ogimage.org/checker).

**Is it free for commercial use?**
Yes. The code is MIT. The gallery images belong to their sites and are shown as examples.

## License

[MIT](./LICENSE.md). Fork the kit, the gallery, and the site.

## Links

- [Next.js `ImageResponse`](https://nextjs.org/docs/app/api-reference/functions/image-response)
- [Satori](https://github.com/vercel/satori), the renderer
- [Open Graph protocol](https://ogp.me/)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.