Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Vercel’s OG Image Generator is the @vercel/og and ImageResponse workflow for creating social-card images from React-style markup. In a Next.js App Router project, put a route such as app/api/og/route.tsx behind a public URL, return a 1200×630 PNG with new ImageResponse(...), and set that URL as the page’s og:image. The route can read query parameters to render a different card for each page. Its main constraint is that it is not a browser: it renders with Satori and Resvg, supports flexbox and a subset of CSS rather than CSS Grid, and has a 500KB maximum bundle size.

What Vercel’s OG Image Generator does

The workflow generates a social preview image on demand from markup and data. A social platform or other crawler fetches the image URL in your page metadata; the deployed endpoint renders the card and returns a PNG. Vercel describes CDN caching as a way to reduce repeated computation. It is useful when titles, authors, product names, or other page data should appear in branded previews without manually designing and storing a separate image for every page.

This is not the same as taking a screenshot of a live web page in a full browser. The renderer is Satori plus Resvg, converting supported HTML/CSS-like markup to PNG. That distinction explains both the speed and the layout limitations: you compose a card using supported elements and styles, rather than asking Chromium to reproduce an arbitrary page.

Requirements and the rendering limits to plan around

  • For Next.js: the current Vercel guide lists Node.js 22 or newer and Next.js 12.2.3 or newer. In an App Router project, @vercel/og is included; for other projects the guide gives pnpm i @vercel/og as the installation command.
  • Canvas: Vercel recommends 1200×630 pixels for an OG image. Those dimensions are the canvas you set in ImageResponse; they do not guarantee that every social network will display the same crop or preview treatment.
  • CSS: only flexbox (display: flex) and a subset of CSS properties are supported. CSS Grid is not supported. Build the card as nested flex containers and verify each style against the supported properties rather than assuming browser CSS will work.
  • Fonts: custom font files must be TTF, OTF, or WOFF. TTF and OTF are preferred for parsing speed.
  • Bundle: the maximum bundle size is 500KB, counting JSX, CSS, fonts, images, and other assets. Large assets may be fetched at runtime where appropriate instead of bundled.

These constraints favor a small, deliberate card template: a background, a few text blocks, and only the assets the design needs. A complex page layout, unsupported CSS, or oversized local font can fail even though the same styling works in a browser.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Create a dynamic image route in Next.js

In an App Router project, create app/api/og/route.tsx. This example accepts a title query parameter, falls back to a usable title, and returns a 1200×630 image. It avoids rendering arbitrary markup from the request; the query string supplies text only.

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')?.trim() || 'A page worth sharing';

  return new ImageResponse(
    (
      <div
        style={{
          width: '100%',
          height: '100%',
          display: 'flex',
          flexDirection: 'column',
          justifyContent: 'space-between',
          backgroundColor: '#101827',
          color: '#ffffff',
          padding: '72px',
          fontSize: 64,
          fontWeight: 700,
        }}
      >
        <div style={{ display: 'flex', fontSize: 24, color: '#9fb3d1' }}>
          Example site
        </div>
        <div style={{ display: 'flex', lineHeight: 1.15 }}>{title}</div>
        <div style={{ display: 'flex', fontSize: 22, color: '#9fb3d1' }}>
          example.com
        </div>
      </div>
    ),
    { width: 1200, height: 630 }
  );
}

Use a short, valid string for titles. Since a long title can overflow, production templates should limit its length or choose a smaller font size for longer values. For pages whose content is controlled by visitors, treat query parameters as untrusted input: do not interpret them as JSX, and apply the same content-safety rules you use for other displayed user data.

The runtime declaration above selects the Edge Runtime for a conventional App Router endpoint. If your deployment target or framework setup differs, confirm which runtime that endpoint supports. Vercel also documents an equivalent API endpoint approach for projects that do not use the App Router.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Connect the route to page metadata

The image endpoint must be publicly fetchable and referenced by an absolute URL in the page’s Open Graph metadata. For example, the deployed route for a title can be referenced like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<meta
  property="og:image"
  content="https://www.example.com/api/og?title=Shipping%20updates"
/>

In an application with one generated card per page, construct this URL from the page’s data rather than hard-coding one title. Encode query values as URL parameters so spaces and reserved characters do not corrupt the URL. The social crawler requests the image separately from the HTML page, so returning the endpoint URL in metadata is not enough if the endpoint itself is blocked or inaccessible.

Vercel recommends allowing the OG API path in robots.txt, for example with Allow: /api/og/*, and using the endpoint’s absolute URL in og:image. Check the deployed path against your actual route and robots rules; a rule for a different path will not help the crawler fetch this endpoint.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Customize the image with ImageResponse options

new ImageResponse(element, options) takes a React element plus rendering and response options. The API reference lists dimensions, emoji set, custom fonts, debug mode, HTTP status, status text, and headers. The example above sets dimensions explicitly; the remaining options are useful when a route needs particular typography, diagnostics, or response behavior.

  • Custom fonts: load an accepted font file and pass it through the fonts option when constructing the response. Keep its size in mind: fonts count toward the 500KB bundle limit, and TTF or OTF is preferred for parsing speed.
  • External images: Vercel’s examples include images fetched by URL parameter. Keep remote assets dependable and account for their fetch time; where assets are fixed, avoid unnecessarily making every render depend on a slow external host.
  • Emoji, SVG, and internationalized text: these are covered by official examples, but they still need testing with the exact characters and layout you ship. Different scripts and longer translations can change line wrapping.
  • Experimental Tailwind: examples include experimental Tailwind CSS support. Treat it as an option to validate in your own route, not as a promise that all Tailwind classes or browser CSS features are supported.
  • Encrypted parameters: official examples include encrypted parameters for secure URLs. This can be relevant when a URL must carry data without exposing it as ordinary query text; it does not remove the need to make the image endpoint reachable to a crawler.

The API reference documents a default content-type: image/png and cache-control: public, immutable, no-transform, max-age=31536000. Treat those as implementation defaults, not a universal caching strategy. If you set your own headers, verify the deployed response and choose freshness behavior that matches how often the underlying page data can change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

Vercel OG is for rendering a designed social card from markup. If what you need instead is a screenshot of a live webpage, ScreenshotNeo is a separate API built for that job; it does not replace the OG-card rendering workflow. One GET request can return a PNG, JPEG, WebP, or PDF. The API docs are at ScreenshotNeo documentation.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000, and every feature is on every plan. See ScreenshotNeo for details. Sign up for 1,000 free screenshots a month, no card required.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Make dynamic routes reliable and cacheable

A reusable endpoint makes many cards from one template, but the URL is also part of the cache identity. If two pages render different titles, their image URLs must differ in a way that the cache can distinguish. Conversely, if a URL is stable while its underlying content changes, a long-lived immutable response may preserve an old card. Decide whether a card is content-addressed/versioned or expected to update at the same URL, then select headers and URL strategy accordingly.

Social crawlers are independent clients: they may fetch metadata and its image at different times. Deploy and test the endpoint before publishing metadata that points to it. Check that an unauthenticated request can retrieve the image, that redirects do not lead somewhere inaccessible, and that the response headers match the intended image and caching behavior. The documentation’s CDN caching intention can reduce repeat work, but caching does not make a private or failing route public.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Vercel reported a historical launch comparison in 2022 of 5× faster P99 time to first byte (4.96 seconds to 0.99 seconds) and 5.3× faster P90 (4 seconds to 0.75 seconds) versus its previous implementation. Those are workload-specific historical measurements, not a current guarantee or a benchmark for every route. Your route’s assets, font loading, network dependencies, and cache-hit rate affect its actual latency.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Troubleshoot blank, missing, or unsupported images

The card is blank or does not appear on a social platform

  • Open the deployed image URL directly. Confirm it returns an image rather than an error page, login page, or redirect the crawler cannot follow.
  • Check that the page’s og:image value is an absolute URL and points to the deployed route, including the correct path and query string.
  • Review robots.txt for a rule allowing the actual OG API path. Vercel’s example is Allow: /api/og/*; adapt it to your endpoint.
  • Inspect response headers and confirm the response has the expected image content type. If you changed headers, verify they did not turn the response into a non-image or make caching stale.

The route errors after deployment

  • Check the runtime and framework requirements against the current Vercel guide: Node.js 22 or newer and Next.js 12.2.3 or newer for Next.js implementations.
  • Reduce the bundled JSX, CSS, fonts, and images if the bundle exceeds 500KB. Move suitable large assets to runtime fetches rather than including them in the bundle.
  • Replace CSS Grid or unsupported browser styling with flexbox and supported properties. The renderer is not a full browser engine.
  • Test custom font files in an accepted format (TTF, OTF, or WOFF), with TTF or OTF preferred. A font that works in the page’s browser is not automatically usable by this renderer.

The image is cut off or text is laid out badly

  • Render with the recommended 1200×630 dimensions and inspect the entire canvas, not just the center crop in an editor.
  • Shorten or wrap dynamic titles and test unusually long values. A card that works for one title may overflow for another.
  • Use flexbox-based layout and supported CSS only. For internationalized pages, inspect scripts with different glyph widths and line breaks.
  • Use the API’s debug option while diagnosing a rendering issue, then verify the normal response after changing the route.

The image does not update after page content changes

Check whether the URL stayed the same and whether the response is being cached. The documented default cache-control value is immutable for a long max-age; changing content behind that same URL can therefore conflict with the cache policy. Use a URL/versioning strategy that changes when card content changes, or set response headers appropriate to your freshness needs, then verify the deployed response.

Choose this workflow when its trade-offs fit

Need Fit Reason
One branded card template with page-specific text Strong fit A route can read query parameters and render data into a reusable element.
Precise browser rendering of an existing webpage Weak fit Satori/Resvg supports a subset of CSS and is not a full browser screenshot engine.
CSS Grid or complex browser-only effects Weak fit CSS Grid is unsupported and only a subset of CSS properties is available.
Small social image returned as PNG Strong fit The documented workflow generates PNG output and recommends 1200×630 dimensions.
Large bundled fonts and assets Needs planning All bundle contents count toward the 500KB maximum; suitable large assets can be fetched at runtime.

Vercel does not state an OG-specific price or per-image tariff in the official material covered here, so do not infer a per-render cost from the feature description. If cost is material to your application, check the current Vercel plan and function pricing separately for your deployment and workload.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.