OG Image Generators Compared: OGMagic vs @vercel/og vs Cloudinary vs DIY

There are dozens of ways to generate Open Graph images. Here's an honest comparison of the most popular approaches so you can pick the right one for your project.

10 min read

TL;DR — Quick Comparison Table

OGMagic
@vercel/og
Cloudinary
DIY
Setup time
30 seconds
15-30 min
30-60 min
2-8 hours
Code needed
0 lines
20-100 lines
10-50 lines
100-500 lines
Framework lock-in
None
Vercel only
None
None
Free tier
50 calls/mo
Unlimited*
25 credits
Self-hosted
Pricing
$12 one-time
Free (Vercel costs)
$89+/mo
Server costs
Templates
50+ built-in
Build your own
Limited
Build your own
Visual editor
Yes
No
Dashboard
No

* @vercel/og runs on your Vercel account, consuming your Edge Function invocations.

1. OGMagic — The API URL Approach

OGMagic takes the simplest possible approach: your OG image is just a URL with query parameters. No SDK, no build step, no code at all.

HTML — That's literally it
<meta property="og:image" content="https://ogmagic.dev/api/og?template=gradient-mesh&title=My+Post" />

Pros

  • Zero code, zero dependencies, zero build step
  • Works with any framework, any language, any platform
  • 50+ professionally designed templates
  • Visual editor to preview and customize designs
  • $12 one-time (not monthly) for Pro tier
  • No signup needed for free tier

Cons

  • Less design flexibility than building your own with Satori
  • Depends on external service (OGMagic servers)
  • Free tier limited to 50 calls/month

Best for

Developers who want great-looking OG images without spending time on implementation. Blogs, documentation sites, SaaS landing pages, portfolio sites — anywhere you want polished social previews without the overhead.

2. @vercel/og — Satori + Edge Functions

Vercel's @vercel/og package uses Satori under the hood to render JSX to images on Vercel Edge Functions. It's powerful but requires real implementation work.

app/api/og/route.tsx — Vercel OG setup
import { ImageResponse } from '@vercel/og';

export const runtime = 'edge';

export async function GET(request: Request) {
  const { searchParams } = new URL(request.url);
  const title = searchParams.get('title') ?? 'My Site';

  return new ImageResponse(
    (
      <div style={{
        display: 'flex',
        fontSize: 60,
        background: 'linear-gradient(to bottom, #1a1a2e, #16213e)',
        width: '100%',
        height: '100%',
        alignItems: 'center',
        justifyContent: 'center',
        color: 'white',
      }}>
        {title}
      </div>
    ),
    { width: 1200, height: 630 }
  );
}

Pros

  • Full design control — write any JSX layout
  • Runs on your own Vercel account (no external dependency)
  • Custom fonts, logos, avatars
  • Free if you're already on Vercel

Cons

  • Vercel-only — won't work on Netlify, Cloudflare, or self-hosted
  • You have to design and code every template from scratch
  • Satori has CSS limitations (no grid, limited flexbox, no gradients in text)
  • Debugging layouts in Satori is painful — no DevTools, trial-and-error
  • Custom fonts require manual loading and binary embedding
  • No visual editor — code-only workflow

Best for

Teams already on Vercel who need highly customized, brand-specific OG images and have the engineering time to build and maintain them. If your OG image needs to include dynamic data like user avatars, GitHub stats, or custom graphics, @vercel/og gives you that flexibility.

3. Cloudinary — Image Transformation

Cloudinary is primarily a media management platform, but you can use its URL-based transformations to compose OG images by overlaying text on background images.

Cloudinary URL — Gets complex fast
https://res.cloudinary.com/demo/image/upload/w_1200,h_630,c_fill/l_text:Arial_60_bold:My%20Blog%20Post,co_white,g_center/bg_gradient.jpg

Pros

  • Powerful image manipulation (overlays, effects, crops)
  • CDN-delivered, fast globally
  • Works with any stack

Cons

  • URL syntax is complex and hard to read/debug
  • Expensive — paid plans start at $89/month
  • Not designed for OG images specifically
  • Limited text layout control compared to HTML/CSS-based approaches
  • Need to upload and manage base images

Best for

Teams already using Cloudinary for image management who want to add OG image generation without a new service. Not ideal if OG images are your only use case — too expensive and complex.

4. DIY — Puppeteer / Playwright

The "build it yourself" approach: spin up a headless browser, render an HTML page, take a screenshot. Maximum flexibility, maximum effort.

puppeteer-og.js — DIY screenshot approach
const puppeteer = require('puppeteer');

async function generateOG(title, description) {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.setViewport({ width: 1200, height: 630 });
  
  await page.setContent(`
    <html>
      <body style="margin:0; display:flex; align-items:center; 
        justify-content:center; background:#1a1a2e; color:white;
        font-family:sans-serif; height:100vh">
        <div>
          <h1>${title}</h1>
          <p>${description}</p>
        </div>
      </body>
    </html>
  `);
  
  const screenshot = await page.screenshot({ type: 'png' });
  await browser.close();
  return screenshot;
}

Pros

  • 100% design freedom — real browser rendering
  • Use any CSS, any font, any layout
  • No external dependencies or services
  • Can capture complex, interactive designs

Cons

  • Slow — headless browser startup takes 1-5 seconds per image
  • Resource-heavy — needs a server with enough RAM for Chromium
  • Won't run on serverless/edge (Chromium too large)
  • You maintain everything: templates, server, scaling, caching
  • Security risk — rendering untrusted HTML in a browser

Best for

Build-time generation where speed doesn't matter (static site generators), or projects with extremely custom requirements that can't be met by any service. If you're generating thousands of images at build time and have server infrastructure, this works.

When to Use Each

Choose OGMagic if...

You want beautiful OG images with zero implementation effort. Great for blogs, docs, SaaS products, and portfolios. Works with any tech stack.

Choose @vercel/og if...

You're on Vercel, need pixel-perfect brand-specific designs, and have engineering time to build custom templates in JSX.

Choose Cloudinary if...

You already pay for Cloudinary and want to add OG images without a new vendor. Otherwise, too expensive for just OG images.

Choose DIY if...

You need full browser rendering, have server infrastructure, and generate images at build time rather than on-demand.

The Verdict

For most developers, the question comes down to: how much time do you want to spend on OG images?

If the answer is "as little as possible" — OGMagic gets you from zero to beautiful OG images in 30 seconds. No code, no build step, no signup. Just a URL.

If you need deep customization and you're already on Vercel, @vercel/og is solid — just budget a few hours for implementation and ongoing maintenance.

Everything else is either overkill (Cloudinary, Puppeteer) or requires meaningful engineering investment for what is, at the end of the day, a preview image.

Ready to try OGMagic?

50 free API calls/month, no signup needed. Or upgrade to Pro for $12 one-time and get 5,000 calls/month + 50 templates.

📬

Get OG tips & product updates

Join our newsletter for Open Graph best practices, new template releases, and exclusive discounts. No spam, unsubscribe anytime.

🔒 We respect your inbox. No spam, ever.