Unfurlkit vs Self-Hosted Puppeteer or Playwright

A common DIY way to make OG images: write an HTML template, open it in headless Chrome, and save a 1200×630 screenshot. Puppeteer and Playwright are the two usual libraries for this. Unfurlkit is a hosted URL that returns the image for you. Both work. They trade control for upkeep in different ways.

What the DIY approach involves (per the official docs)

Sources (accessed 21 Oct 2026):

Puppeteer

  • npm i puppeteer downloads a recent Chrome for Testing (about 170 MB on macOS and 282 MB on Linux, according to the docs) plus a chrome-headless-shell binary.
  • Some package managers block install scripts by default. Then the browser download is skipped and Puppeteer throws Could not find Chrome. You can fix this with npx puppeteer browsers install.
  • puppeteer-core is the variant that doesn't download a browser. It's for connecting to a remote browser or one you manage yourself.
  • Screenshot options include type (default png), quality (0–100, not for PNG), clip, fullPage, omitBackground (transparency) and encoding (binary or base64).

Playwright

  • page.screenshot({ path }) saves a file. Calling it with no path returns a buffer you can serve or upload.
  • locator(...).screenshot() captures a single element, which is handy for rendering just a 1200×630 card element.
  • Full-page screenshots are also supported.

A minimal Puppeteer version:

import puppeteer from 'puppeteer';

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;width:1200px;height:630px;
  display:flex;align-items:center;padding:80px;font:64px system-ui">
  ${escapeHtml(title)}</body></html>`);
const png = await page.screenshot({ type: 'png' });
await browser.close();

(escapeHtml is yours to write. Never inject raw titles into HTML.)

What you then own, beyond the snippet:

  • A runtime that can run Chrome. A few hundred MB of browser is a lot for many serverless platforms, so people often use a dedicated server, a container, or a hosted browser service.
  • Fonts installed on that machine, including fallback fonts for non-Latin scripts and emoji.
  • Caching. Launching a browser per request is slow and memory-heavy, so you'll want to cache by input and set CDN headers.
  • Concurrency limits and a queue so a burst of shares doesn't start dozens of browsers.
  • Security: rate limiting, input length limits, escaping, and making sure the browser can't be pointed at internal URLs if you accept URLs as input.
  • Chrome and library updates.

Price: Puppeteer and Playwright are free, open-source libraries. Your cost is the compute and the time to run them. We don't estimate either here.

What Unfurlkit is (per our spec)

  • A hosted URL: https://unfurlkit.com/v1/basic.png?title=…&theme=dark, returning a 1200×630 PNG.
  • Templates: basic (title, subtitle, theme = light|dark, accent). Also blog, product, changelog, repo, event and podcast. See templates.
  • Images are cached at the CDN. Only unique, uncached renders count, and shares and cache hits are free.
  • Free: every image URL needs your key. A Free key gets 10 renders in total (no monthly reset), with a small "unfurlkit" watermark, and needs no card. Pro: $9/mo or $90/yr for 10,000 renders a month, no watermark, and custom fonts (Inter, Roboto, Playfair Display, JetBrains Mono) and logo. Pro URLs are signed.
  • Over the limit, images keep rendering (on Free, new ones as a plain basic card with the small mark). See pricing.
  • Right-to-left scripts such as Arabic and Hebrew aren't supported yet at launch.

Side by side

Feature Self-hosted Puppeteer/Playwright Unfurlkit
What it is Libraries driving a real browser Hosted image URL
Layout Full CSS: anything Chrome renders (grid, web fonts, SVG, canvas) Fixed basic template
Scripts and languages Whatever fonts you install RTL not supported yet at launch
Infrastructure Server or container with Chrome None
Caching You build it Built in
Cost Your compute and time Free tier, or Pro $9/mo
Setup Code, browser install, deployment One meta tag

When Puppeteer or Playwright is the better fit

  • You need full CSS or custom design. Grid layouts, complex SVG, charts, web fonts, or a card that reuses your site's real components. A real browser renders all of it.
  • You need scripts we don't support yet, such as Arabic or Hebrew, or specific CJK fonts. With your own browser and fonts, you control that.
  • You already run headless Chrome for testing or PDFs. Adding OG images to an existing pipeline costs little.
  • You render at build time. For a static site with a fixed set of pages, screenshotting during the build means no runtime service at all.
  • You want no third-party dependency for images.

When Unfurlkit is the better fit

  • You don't want to run Chrome. No browser binaries, containers, fonts or queue.
  • Your stack can't run a browser easily, such as WordPress hosting, Ghost(Pro), or a static host. A URL in a meta tag works anywhere.
  • The basic card is enough. A title, subtitle, theme and accent cover most blogs and docs.
  • You want predictable failure. Over the limit, images still render (on Free, new ones as a plain basic card).

Testing either way

Whichever you choose, check the result with the Free OG Image Checker. It shows how your page previews on X, LinkedIn, Facebook, WhatsApp, Slack, Discord and iMessage. Keep files under 600 KB for WhatsApp (see OG image size). PNG screenshots of photo-heavy designs can exceed that, so consider JPEG with a quality setting.

Updated 2026-10-21

Try it freePricing