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

Automatically generate social sharing images by creating a page-specific image URL, then placing that public URL in the page’s og:image metadata. You can render a card from page data with a code-based route such as Vercel’s @vercel/og, or transform an existing image with a service such as Cloudinary. The right route depends on whether you need to create a designed card from scratch or adapt assets you already have.

How the pieces fit together

Social preview generation has two parts: produce an image, then tell social platforms where to fetch it. The image can be generated dynamically for each page or composed from an existing asset. Either way, the page’s HTML must expose the resulting, publicly accessible image URL in its social metadata.

  1. Choose an image workflow. Render a card from page data, or use an image transformation URL to crop, resize, and add text or graphics to an existing asset.
  2. Make the image URL page-specific. Use a route parameter or other page data to identify the title, image, or content for that page.
  3. Add the URL to metadata. Set og:image to an absolute URL that social crawlers can request. twitter:image may also point to the image; Vercel’s deployment metadata guidance says og:image can act as its fallback.
  4. Check crawler access and the actual preview. Ensure the route is not blocked by robots rules or authentication, and inspect how the intended platform renders it.

Choose a generation approach

Render a card from page data

A code-rendered route is useful when a card should be designed from the page’s title, author, category, or other content. Vercel documents using @vercel/og with an ImageResponse route to render social cards from markup, with route parameters supplying changing content. See Vercel’s OG image generation documentation.

This approach gives you control over layout and page-specific text, but the renderer has implementation constraints. Vercel’s documented setup lists Node.js 22 or newer and Next.js 12.2.3 or newer; the Next.js App Router includes the package. The renderer supports a subset of CSS, including flexbox but not CSS grid, and supports TTF, OTF, and WOFF fonts. Vercel documents a 500 KB bundle limit. Check these requirements against the versions and deployment configuration you actually use before building a complex template.

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.

Transform an existing image

If you already have a suitable photo, illustration, or brand asset, a managed transformation workflow can create the share image by changing its size or crop and adding text or graphics. Cloudinary’s article describes using a transformation URL in social metadata, and its transformation guide covers resizing, cropping, text overlays, and graphics: social sharing images and image transformations.

This can fit teams already managing assets with Cloudinary. Confirm that the source asset is available, that the transformation URL behaves as expected, and that the image is delivered without access restrictions. These are different workflows, not a measured performance or cost comparison.

Compare the practical trade-offs

Decision Code-rendered route Managed transformation
Starting point Markup and page data Existing image assets and transformation parameters
Often fits best Applications needing per-page text or layout, especially those already using Next.js and Vercel Teams already using Cloudinary or needing managed asset transformations
Check before launch Runtime compatibility, CSS and font support, bundle size, route access, and cache behavior Asset availability, transformation URL behavior, delivery access, and current service terms

Set image dimensions and design

Recommendations differ slightly. Vercel’s documentation, last updated in 2025, recommends 1200 × 630 pixels. A Cloudinary article from 2022 calls 1200 × 627 pixels the most frequently recommended size. Neither figure is a universal mandate; check current guidance for the platforms where your audience shares links.

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.

Design for a small preview: keep essential text legible, use a clear visual hierarchy, and avoid placing important content at the very edges. If you render a card from data, account for long titles and missing fields so the layout remains usable across pages.

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

Publish the image in page metadata

Once the generation route or transformation URL works, set the page’s social metadata to that image’s absolute URL. For example:

<meta property="og:image" content="https://example.com/og/article-title">
<meta name="twitter:image" content="https://example.com/og/article-title">

Replace the example URL with the public URL for your own route or transformed asset. For dynamic routes, ensure each page resolves to the correct content and image rather than accidentally sharing one generic card. Vercel’s deployment metadata guidance describes twitter:image as supporting static or dynamic images and og:image as a fallback.

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.

Make the generated image fetchable

Social crawlers need to request the image without a browser session. Vercel recommends allowing OG image API routes in robots.txt. Also check for authentication requirements, blocked paths, redirects, and server errors. Passing a robots check only establishes crawler permission; it does not guarantee that a particular platform will display a preview exactly as expected.

For parameterized image URLs, validate externally supplied values and choose cache behavior that matches how often page content changes. Vercel says @vercel/og adds CDN caching headers to reduce recomputation and cost. If a title or image changes, consider whether the existing cached result should remain valid or be refreshed.

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

Test the complete sharing path

  1. Open the page source or rendered HTML and confirm the social image metadata contains the intended absolute URL.
  2. Request the image URL without signing in. Confirm it returns an image rather than an error page, redirect loop, or blank response.
  3. Check the image dimensions, text, crop, and page-specific content at the URL itself.
  4. Verify robots rules permit the relevant route, then test the link using the preview tools or sharing flow of the target platform.
  5. After changing page content or the image template, check whether caching delays the updated preview.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

The preview has no image

Check that og:image is present in the HTML delivered to crawlers, points to an absolute URL, and does not require authentication. Confirm that robots rules do not disallow the image route.

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

The image route fails in production

Compare the deployed Node.js and Next.js versions with Vercel’s documented requirements for the setup. Review runtime errors and ensure the route is deployed where the metadata URL points.

The card layout breaks or text is missing

For a Vercel renderer, check that the template uses supported CSS and a supported font format. Keep the bundle within the documented 500 KB limit, and test long titles and absent data rather than assuming every page has identical content.

The preview shows old content

Check caching at the image route and any platform-side preview cache. Make sure the URL or cache invalidation strategy changes when content changes if a fresh image is required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

The generated image is inaccessible to crawlers

Test the URL without cookies or credentials, inspect redirects and response failures, and allow the route in robots.txt where appropriate. Then verify actual behavior on the target platform; crawler access alone does not guarantee preview presentation.

Or skip the browser setup

If your goal is to capture a page as an image rather than design a branded, data-driven social card, ScreenshotNeo provides a screenshot API. For a one-call capture, use cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; bot checks, blank pages, and failed loads are not billed. An MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.

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.