March 29, 2026 · 11 min read · by OGPeek

OGPeek vs Cloudflare Workers OG: Dynamic OG Image Generation Compared

There are two fundamentally different ways to generate dynamic OG images: use a managed API that returns a PNG from URL parameters, or build your own rendering pipeline on edge infrastructure. This post compares OGPeek (managed API) with Cloudflare Workers OG (DIY edge rendering) honestly—including where Cloudflare's approach wins.

OGPeek vs Cloudflare Workers OG comparison

What Cloudflare Workers OG Is

Cloudflare Workers lets you run JavaScript at the edge across 300+ data centers worldwide. To generate OG images, you write a Worker that uses Satori (the same SVG rendering engine behind Vercel OG) combined with resvg-wasm to convert JSX templates into PNG images on the fly.

There are two common approaches:

In both cases, you are responsible for the template code. You write JSX that describes the layout. You handle font files (loading them as ArrayBuffers from KV, R2, or bundled into the Worker). You set up caching in KV or the Cache API. You debug rendering issues when Satori doesn't support a CSS property you expected.

Here's what a minimal Cloudflare Worker OG image generator looks like:

import satori from 'satori';
import { Resvg } from '@resvg/resvg-wasm';

export default {
  async fetch(request, env) {
    const url = new URL(request.url);
    const title = url.searchParams.get('title') || 'Hello World';

    // Load font from KV or R2
    const fontData = await env.FONTS.get('inter-bold', 'arrayBuffer');

    const svg = await satori(
      {
        type: 'div',
        props: {
          style: {
            width: '100%', height: '100%',
            display: 'flex', alignItems: 'center',
            justifyContent: 'center',
            background: 'linear-gradient(135deg, #1a1a2e, #16213e)',
            color: 'white', fontSize: 60,
            fontFamily: 'Inter',
          },
          children: title,
        },
      },
      { width: 1200, height: 630, fonts: [{ name: 'Inter', data: fontData }] }
    );

    const resvg = new Resvg(svg);
    const png = resvg.render().asPng();

    return new Response(png, {
      headers: {
        'Content-Type': 'image/png',
        'Cache-Control': 'public, max-age=86400',
      },
    });
  },
};

That's the simple version. A production setup needs error handling, multiple font weights, dynamic layouts for varying text lengths, caching logic, and probably a few different template variations. You're building and maintaining an image generation service.

What OGPeek Is

OGPeek is a hosted REST API. You pass parameters in a URL—title, subtitle, template, theme, brand color—and you get back a 1200×630 PNG. No Worker to deploy. No font files to manage. No JSX to write.

Here's the equivalent of the Worker above:

<meta property="og:image"
  content="https://todd-agent-prod.web.app/api/v1/og
    ?title=Hello+World
    &template=gradient
    &theme=midnight
    &brandColor=%23F59E0B" />

That's it. One <meta> tag. No build step, no deployment, no infrastructure to manage. OGPeek handles rendering, caching, font loading, and edge delivery. You choose from 7 professionally designed templates and customize with URL parameters.

Feature Comparison

Feature Cloudflare Workers OG OGPeek
Pricing Free 100K req/day, then $5/mo + $0.50/M Free 50/day, $9/mo (10K), $29/mo (50K)
Setup time 2–8 hours (template, fonts, caching) 5 minutes (paste URL into meta tag)
Template variety Whatever you build yourself 7 pre-built, professionally designed
Custom fonts Yes (manual font file management) Yes (handled via API)
Edge CDN 300+ Cloudflare locations Global CDN via Firebase
Design control Full (you write JSX) Template-based with brand customization
Ongoing maintenance You maintain the code None — managed service
Scaling Automatic (Workers scale globally) Automatic (managed infrastructure)
Framework dependency None (any site can call the Worker) None (any site can use the URL)
Satori CSS limitations Your problem to debug Handled by OGPeek

Developer Experience

Cloudflare Workers Approach

Building OG images on Cloudflare Workers is a real engineering project. Here's the typical workflow:

  1. Set up the Worker projectwrangler init, configure wrangler.toml, set up TypeScript if needed.
  2. Install dependenciessatori, @resvg/resvg-wasm, and potentially yoga-wasm-web for layout. Handle WASM initialization quirks.
  3. Manage fonts — Download font files, upload to KV or R2, load them as ArrayBuffers at request time. Each font weight is a separate file.
  4. Write JSX templates — Design your OG image layout in JSX with inline styles. Satori supports a subset of CSS—no box-shadow, limited background support, no CSS Grid. You'll discover these limitations while debugging.
  5. Set up caching — Use KV or the Cache API to avoid re-rendering the same image. Write cache key logic, handle invalidation.
  6. Deploy and testwrangler deploy, test with social media debuggers (Facebook, Twitter, LinkedIn), iterate on the template.

If you've done this before, it goes faster. If you haven't, expect to lose an afternoon to Satori's CSS subset alone. The flexbox-only layout model catches people off guard.

OGPeek Approach

  1. Pick a template — Browse the 7 available templates on the OGPeek site.
  2. Construct the URL — Add your title, subtitle, template name, theme, and brand color as query parameters.
  3. Add to your HTML — Paste the URL into your og:image meta tag.
  4. Done.

There's no step 5. If you're generating OG images dynamically (say, for blog posts), you template the URL in your static site generator or CMS. One line of code in your layout file.

Time-to-first-image: With Cloudflare Workers, you'll have your first OG image rendering after a few hours of setup. With OGPeek, you'll have it in under 5 minutes. That's not a minor difference when you have 20 other things to ship this week.

Pricing Analysis

Let's get specific about costs at different volumes. This is where Cloudflare Workers looks compelling on paper.

Cloudflare Workers Costs

OGPeek Costs

Cost at Different Volumes

Monthly Volume Cloudflare Workers OGPeek
1,000 images $0 (free tier) $0 (free tier)
10,000 images $0 (free tier) $9/mo
50,000 images $0 (free tier) $29/mo
500,000 images $0–$5/mo Custom pricing
3,000,000 images $5/mo Custom pricing

On pure infrastructure cost, Cloudflare Workers wins at every volume tier. That's not close. Cloudflare's free tier alone covers what most sites will ever need.

But infrastructure cost isn't total cost. If a senior developer spends 6 hours building and debugging the OG image Worker, that's $600–$1,200 in engineering time (at $100–$200/hr). OGPeek's $9/month plan pays for itself in the first 5 minutes.

The honest math: If you need fewer than 50,000 images/month, OGPeek is cheaper when you factor in engineering time. If you need 100K+ images/month and have developers who already know Workers, Cloudflare is cheaper overall. The crossover point depends on your hourly rate and how many template variations you need.

Template Quality

Cloudflare Workers: You Design Everything

With Workers, your OG image quality is entirely dependent on your design skills and your patience with Satori's CSS subset. You can build anything—if you can express it in flexbox with inline styles.

In practice, most DIY OG images end up being a solid color background with white text centered on it. Creating polished gradients, proper typography, and professional layouts in Satori takes real design effort. Every template variation is another JSX component to maintain.

The upside is total creative freedom. If you need pixel-perfect brand alignment or complex layouts, Workers gives you that—eventually.

OGPeek: 7 Pre-Built Templates

OGPeek ships with 7 professionally designed templates: gradient, split, minimal, bold, dark, editorial, and geometric. Each supports custom brand colors, themes, titles, and subtitles. The typography, spacing, and visual hierarchy are already solved.

The constraint is that you're working within those 7 templates. You can customize colors and content, but you can't create entirely new layouts. For most use cases—blog posts, docs, product pages, landing pages—the existing templates are more than enough. For highly custom brand requirements, they may not be.

When to Choose Cloudflare Workers

Cloudflare Workers is the right choice when:

Cloudflare Workers is genuinely excellent infrastructure. The global edge network is fast, the pricing is among the most competitive in the industry, and Workers are production-battle-tested. If you're already in that ecosystem, building your own OG renderer is a reasonable investment.

When to Choose OGPeek

OGPeek is the right choice when:

A Note on Reliability

Both approaches are solid in production. Cloudflare Workers has a strong uptime track record and your Worker runs across their global edge network. OGPeek's infrastructure is managed, so you don't handle incidents yourself—but you depend on OGPeek being up.

With Cloudflare Workers, you own the uptime story. If rendering breaks, you debug and fix it. With OGPeek, you rely on the service. Both models work. It depends on whether you prefer control or convenience.

Frequently Asked Questions

Can Cloudflare Workers generate OG images?

Yes. You can use Satori and resvg-wasm inside a Cloudflare Worker to render JSX templates to PNG images at the edge. Cloudflare also provides @cloudflare/pages-plugin-vercel-og for Pages projects. However, this is a DIY approach that requires writing and maintaining template code yourself.

Is Cloudflare Workers OG image generation free?

Cloudflare Workers has a free tier with 100,000 requests per day. Beyond that, the paid plan is $5/month plus $0.50 per million requests. You'll also need KV storage for caching rendered images, and the real cost is developer time to build, debug, and maintain the image rendering pipeline.

How does OGPeek compare to building OG images with Cloudflare Workers?

OGPeek is a managed API where you pass URL parameters and get a PNG back instantly. No code to write or deploy. Cloudflare Workers gives you full control but requires building the entire rendering pipeline yourself. OGPeek is faster to set up; Cloudflare Workers is cheaper at very high volumes.

Which is better for a small team: OGPeek or Cloudflare Workers OG?

For small teams, OGPeek is typically the better choice. You get professional OG images in minutes with no code to maintain. Cloudflare Workers makes more sense for teams with dedicated frontend engineers who need complete design control and are already invested in the Cloudflare ecosystem.

Can I use custom fonts with Cloudflare Workers OG images?

Yes, but you need to bundle font files into your Worker or load them from KV/R2 storage. Satori requires ArrayBuffer font data at render time. With OGPeek, custom fonts are handled automatically through the API—no font file management needed.

Skip the infrastructure. Ship the image.

Get dynamic OG images for your site in under 5 minutes. No Workers, no JSX, no font files.

Try OGPeek Free →

Peek Suite

OGPeek is part of the Peek Suite of developer tools. If you're building products and need quick, polished infrastructure: