Recommended Free Tools
In a Next.js App Router project, add an opengraph-image.tsx file to the route segment that needs a social preview and return an image using ImageResponse from next/og. Export alt, size, and contentType so Next.js can connect the generated image to page metadata. For a custom TypeScript service, Satori can render JSX-like markup and CSS to SVG, but you will need an appropriate way to serve or rasterize that result for your target environment.
This guide follows the current Next.js documentation, last updated February 27, 2026. The examples are documentation-derived, not claims of a tested deployment; confirm parameter types and runtime behavior for the Next.js version and hosting environment you use.
Choose the right TypeScript approach
The right implementation depends on whether your image belongs to a Next.js route or needs to be generated by a separate service. Next.js offers a file convention that ties image generation to metadata. Satori is a lower-level option when you want SVG output and control over the rendering pipeline.
| Use case | Starting point | Trade-off |
|---|---|---|
| Next.js App Router page or route segment | opengraph-image.tsx with ImageResponse from next/og |
Integrated metadata convention and framework caching behavior, with a constrained rendering subset rather than full browser CSS. |
| Custom TypeScript service or non-Next.js framework | Satori directly | JSX-like markup and CSS become SVG; serving or converting the SVG into a raster format is your responsibility. |
| Image is not dynamic | A static supported image file in the relevant Next.js route segment | Fewer runtime dependencies; update the asset when its content changes. |
Next.js describes ImageResponse as the easiest way to generate an image in its metadata documentation. See Next.js metadata file conventions, the ImageResponse API, and Vercel’s OG image generation guide.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
- 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.
Generate a dynamic image in Next.js
1. Add the route-segment image file
For a blog route such as app/blog/[slug]/, create app/blog/[slug]/opengraph-image.tsx. A file in that segment applies to pages beneath it unless a more specific route arrangement changes which image file is used. The current Next.js documentation shows route parameters as a promise; use the parameter shape documented for your installed Next.js version because framework conventions and types can change.
import { ImageResponse } from 'next/og'
export const alt = 'Article social preview'
export const size = { width: 1200, height: 630 }
export const contentType = 'image/png'
export default async function Image({
params,
}: {
params: Promise<{ slug: string }>
}) {
const { slug } = await params
const post = await getPost(slug)
return new ImageResponse(
(
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '100%',
height: '100%',
padding: 64,
background: '#111827',
color: 'white',
fontSize: 64,
}}
>
{post.title}
</div>
),
size,
)
}
getPost above represents your application’s own data access function; it is not supplied by Next.js. Implement it to return the post for the requested slug. Decide what to do when a record is missing, and bound and sanitize externally supplied text before rendering it. Do not assume the deployed runtime can reach every external resource your local development environment can access.
Rank #2
- 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.
The example uses the documented recommended dimensions of 1200 × 630 pixels, identified by Vercel in 2025. Keep essential text away from the edges and inspect actual platform previews for clipping. The exports provide the image’s alternative text, dimensions, and media type for Next.js metadata. If your own page metadata or route setup affects the final head output, inspect the deployed page rather than assuming an image response alone guarantees the desired tags.
2. Keep layout within the renderer’s supported subset
ImageResponse supports flexbox and a subset of CSS properties; it is not a browser renderer with full CSS parity. In particular, do not build a layout that depends on CSS Grid or other advanced browser-only behavior without verifying support. Start with simple flex layouts, explicit dimensions, and styles the documented renderer supports. The Next.js/Vercel pipeline uses Satori and Resvg to produce PNG output; that implementation detail does not remove the need to check the actual result in your runtime.
Rank #3
- 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.
3. Add custom fonts only when the deployment can provide them
The Vercel documentation lists TTF, OTF, and WOFF as supported font formats and recommends TTF or OTF for font parsing speed. Its examples read font bytes and pass them through the fonts option to ImageResponse. If typography matters to the brand, include the font asset deliberately and verify it is available in the deployed environment. Fonts and other assets count toward the documented 500KB maximum bundle size for this ImageResponse setup (Vercel, 2025); reduce bundled assets or use suitable runtime-fetched resources if the limit is a problem.
4. Choose caching behavior for your content
Next.js says generated metadata images are statically optimized and cached by default unless Dynamic APIs, uncached data, or configuration changes that behavior. That default can suit article images that should remain stable, but it matters when a title or other image content changes. Decide whether the image should reflect changing data, then choose data fetching and caching accordingly. A stale preview can be a cache or platform-fetching issue rather than a rendering issue, so inspect the response and page metadata when troubleshooting.
Rank #4
- 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
Use a static image when the preview does not need route data
If the same image can be prepared ahead of time, place a supported static file such as opengraph-image.png in the relevant route segment. Next.js can generate the corresponding image tags automatically. For a static image, a neighboring opengraph-image.alt.txt file can provide its alternative text. This avoids executing application code to compose that image for each route, but a content change requires replacing the asset.
Use Satori directly outside the Next.js convention
Satori converts JSX-like HTML and CSS into SVG. This can be a better starting point for a custom TypeScript service, but SVG generation is not automatically the same as producing a PNG response: choose a renderer or encoding step compatible with the environment where your service runs. The official Satori project documentation is at the Satori README. Verify supported CSS, asset access, output format, and runtime compatibility against your own deployment; no benchmark or universal performance comparison is established here.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Best Value
- 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.
Use the framework-integrated path when Next.js route metadata and its caching conventions are useful. Use direct Satori when you need a separate SVG-oriented rendering flow and can own the rendering and delivery details. If the image has no dynamic inputs, prefer a static asset over adding runtime work without a reason.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Verify the generated image and social metadata
- Request the image URL in the target environment. Confirm the route returns an image response, not an error page, redirect, or blank output.
- Check the rendered content. Confirm the dimensions are the intended size, text is visible and uncut, fonts load, and any data-dependent content is correct.
- Inspect the page head. Confirm the document has the expected
og:imagevalue and image type, width, height, and alternative-text metadata. - Check crawler access. Vercel recommends allowing crawlers to access the image route in
robots.txt. Review access controls and caching if social services cannot fetch the image or keep showing an old preview. - Preview on the platform that matters. Use the relevant social platform’s preview or debugger to catch clipping or stale fetches that a direct browser request will not reveal.
This checklist is a practical verification path, not a claim that a particular implementation has been tested. The recommended dimensions and bundle limit above are documented figures, not guarantees that every social platform will display an image identically.
Troubleshoot common generation problems
- TypeScript rejects the
paramstype: compare it with the route-parameter signature in the documentation for your installed Next.js version. The example uses a promise because that is the current convention shown in the cited metadata documentation; older versions may use different types. - The image route errors for an unknown slug:
getPostis application code. Handle absent records explicitly and ensure the route does not try to render an undefined title. - The response is blank or text is clipped: inspect the returned image directly, simplify the layout to supported styles, verify its width and height, and keep important content inside the canvas margins.
- A font or image asset is missing in production: confirm the deployed runtime can read the asset and that it is included or fetched in a supported way. Check the bundle-size constraint if assets are bundled.
- CSS looks different from the browser page: the image renderer supports a subset of CSS, not the complete browser layout engine. Replace unsupported layout dependencies with documented-supported styles.
- Updated post data does not appear: review whether static optimization, cached data, or configuration is keeping the generated image stable. Also account for the social service’s own preview fetch behavior.
- A social preview is missing despite a valid image response: inspect the page head for the image URL and related metadata, then check crawler access to the route, including the relevant
robots.txtpolicy.
Or skip the browser setup
If your goal is to capture a rendered page rather than design a custom social graphic, ScreenshotNeo is a website screenshot API and MCP server. It captures a webpage; it does not replace the dynamic OG-image route above. One GET request can return a PNG, JPEG, WebP, or PDF. For example, capture the page where your Next.js image route is visible:
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/blog/my-post/opengraph-image -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie and consent banners, newsletter popups, and chat widgets can be removed before capture, with each cleanup step configurable. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for 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 shots. Sign up for ScreenshotNeo’s free plan.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchProduct 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.

