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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use URL2PNG’s v6 screenshot endpoint from server-side Next.js code, then render the returned image URL inside a card. The key detail is signing the exact query string with your API secret; keep that secret on the server, not in a browser component. URL2PNG’s reviewed documentation provides Node.js examples, but no Next.js-specific recipe or Next.js package.

How the URL2PNG request works

URL2PNG’s documented v6 flow builds a PNG endpoint URL containing your API key and a request token. The query string carries the encoded target URL and capture options. The token is an MD5 hash of the entire query string concatenated with your account secret. Because changing parameter order or encoding can change the signed string, construct the query once and use that same exact string when generating the token and request URL.

URL2PNG’s Quickstart Guide shows Node.js usage with the url2png package, including building a screenshot URL or reading image data. The approach below is a server-side Next.js adaptation of the documented signing design, not a vendor-provided Next.js integration. Confirm the installed package API and URL-encoding behavior against the current guide before relying on it; the example is not represented as tested.

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

Keep credentials and signing on the server

Create a server-only environment configuration, for example URL2PNG_API_KEY and URL2PNG_SECRET, and do not prefix either with NEXT_PUBLIC_. Never calculate the token in a client component or expose the secret in HTML, browser JavaScript, or a public API response. Validate target URLs before signing them, and allow only the destinations your product needs if users can submit URLs; this reduces the risk of your server being used to request unintended targets.

#1 Best Overall
HP OmniBook 3 17.3 inch Laptop PC, FHD Display, AMD Ryzen 3 30, 8 GB RAM, 512 GB SSD, AMD Radeon 610M Graphics, Windows 11 Home, Mica Silver, 17-dp0199nr
  • FULL HD IPS DISPLAY - Enjoy vibrant, crystal-clear images with 178-degree wide-viewing angles
  • AMD RYZEN 3 30 PROCESSOR - Everyday performance you can count on; Multitask, stream, game casually, and edit photos smoothly with responsive power and vibrant HDR visuals
  • ENJOY UP TO 14 HOURS AND 15 MINUTES OF BATTERY LIFE - HP Fast Charge restores battery from 0 to 50% in approximately 45 minutes
  • AMD RADEON 610M GRAPHICS - Experience smooth entertainment; Built for streaming and multitasking, enjoy realistic visuals and efficient performance for work and play
  • STORAGE AND MEMORY - 512 GB PCIe NVMe M.2 SSD offers fast speed and efficient storage; and 8 GB LPDDR5 RAM memory boosts performance with higher bandwidth

Build a signed screenshot URL

This helper uses Node’s crypto module and URLSearchParams to form a deterministic encoded query string. Pass only validated, server-approved URLs and explicit options. Check URL2PNG’s current request format and encoding expectations before deployment, especially if using options not shown here.

import { createHash } from "node:crypto";

const endpoint = "https://api.url2png.com/v6/";

type ScreenshotOptions = {
  viewport?: string;
  thumbnailMaxWidth?: number;
  fullpage?: boolean;
  ttl?: number;
  delay?: number;
  unique?: string;
};

export function buildUrl2PngUrl(target: string, options: ScreenshotOptions = {}) {
  const apiKey = process.env.URL2PNG_API_KEY;
  const secret = process.env.URL2PNG_SECRET;
  if (!apiKey || !secret) throw new Error("URL2PNG credentials are not configured");

  const targetUrl = new URL(target);
  if (!["http:", "https:"].includes(targetUrl.protocol)) {
    throw new Error("Only http and https target URLs are allowed");
  }

  const params = new URLSearchParams();
  params.set("url", targetUrl.toString());
  if (options.viewport) params.set("viewport", options.viewport);
  if (options.thumbnailMaxWidth !== undefined) {
    params.set("thumbnail_max_width", String(options.thumbnailMaxWidth));
  }
  if (options.fullpage !== undefined) params.set("fullpage", String(options.fullpage));
  if (options.ttl !== undefined) params.set("ttl", String(options.ttl));
  if (options.delay !== undefined) params.set("delay", String(options.delay));
  if (options.unique) params.set("unique", options.unique);

  const query = params.toString();
  const token = createHash("md5").update(query + secret).digest("hex");
  return `${endpoint}${encodeURIComponent(apiKey)}/${token}/png/?${query}`;
}

Do not independently rebuild or reorder the query after computing token. If you add parameters, include them before signing. Treat the exact endpoint path and token placement as subject to the vendor’s current documentation.

Rank #2
HP 14" HD Chromebook Laptop for Students, Intel Quad-Core N4120(> N4020), 4GB RAM, 64GB eMMC, WiFi, Webcam, HDMI, USB-A&C, 14 Hours Battery Life, Zoom, Chrome OS, CUE Accessories
  • Intel Celeron N4120: 4 Cores & Threads, 1.1GHz Base Clock, Up to 2.6GHz Boost Clock, 4MB Cache, Intel UHD Graphics 600. The perfect combination of performance, power consumption, and value helps your device handle multitasking smoothly and reliably with four processing cores to divide up the work.

Use the image in a Next.js screenshot card

Generate the signed URL in server-side code and pass it to the card as an image source. The external service renders the target page; your Next.js app controls the card’s layout, dimensions, loading behavior, and accessible description. A plain image element avoids requiring a remote-host allowlist in Next.js image configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
type ScreenshotCardProps = {
  title: string;
  targetUrl: string;
};

export function ScreenshotCard({ title, targetUrl }: ScreenshotCardProps) {
  const imageUrl = buildUrl2PngUrl(targetUrl, {
    viewport: "1480x1037",
    thumbnailMaxWidth: 640,
    fullpage: false,
  });

  return (
    <a className="screenshot-card" href={targetUrl}>
      <img
        src={imageUrl}
        alt={`Screenshot preview of ${title}`}
        width="640"
        loading="eager"
      />
      <span>{title}</span>
    </a>
  );
}

In an App Router project, call the helper from a Server Component or a server-only route. A Client Component should receive only the image URL, never the signing secret. If cards are created from user-controlled data, perform validation on the server before generating the URL. Choose an alt description that communicates the preview’s purpose; if the linked title already identifies the destination, avoid redundant wording in surrounding accessible text.

Rank #3
AKCHART 15.6'' AI Laptop with Office 365 12GB RAM 256GB SSD Win 11 Laptops
  • Stunning 15.6" FHD IPS Display: Experience crisp 1920x1080 resolution on this 15.6 inch laptop with an IPS panel that delivers wide viewing angles and vivid colors. The narrow-bezel design maximizes screen real estate for comfortable viewing on this Win 11 laptop, whether you're studying or working.
  • Celeron J4105 Processor & 256GB SSD: Powered by a reliable Celeron J4105 processor paired with 12GB DDR4 memory and a fast 256GB M.2 SSD. This laptop computer supports SSD expansion up to 2TB and TF card expansion up to 1TB, so your storage grows with your needs. Delivers smooth multitasking for daily productivity.
  • AI-Powered Win 11 Laptop: Built-in AI features enhance your productivity with smart assistance for writing, summarizing, and task management. Pre-installed with Win 11 and includes Office 365 subscription. This student laptop is backed by 1-year warranty and 24/7 customer support.
  • All-Day 7000mAh Battery & 180° Hinge: The high-capacity 7000mAh battery keeps this laptop powered through long classes or meetings. The 180-degree lay-flat hinge lets you share your screen effortlessly during presentations. This durable laptop computer adapts to your dynamic workflow.
  • Versatile Connectivity Hub: Equipped with USB 3.2, Type-C, Mini HDMI, and 3.5mm audio jack to connect all your peripherals. Stay online anywhere with high-speed 5G WiFi and Bluetooth 4.2. This college laptop keeps you connected at home, in the library, or on the go.

Choose capture settings for the card

Option Effect When to use it
viewport Sets rendered browser dimensions; the Quickstart gives a default of 1480×1037. Use a desktop-sized viewport for consistent compact previews, or choose dimensions matching the experience you want to show.
thumbnail_max_width Scales the output to a specified maximum width. Set it near the displayed card width to limit oversized image delivery. The app still controls its own CSS sizing.
fullpage Attempts to capture the full document instead of only the viewport; default is false. Keep it false for ordinary cards. Use full-page capture when the card is meant to preview a long page, recognizing that the resulting image may be unusually tall.
unique Changes the cache key to request a fresh capture. Vary it when you need a new render rather than a cached image.
ttl Sets cache lifetime in seconds; documented default is 2,592,000 seconds (30 days). Use a shorter lifetime when destinations change often, or retain the default for stable previews.
delay Waits after document readiness and asset loading. Try it for pages that need extra time to finish rendering before capture.
custom_css_url Applies custom CSS during capture. Use when the captured page needs presentation adjustments supported by your capture workflow.
say_cheese Provides further control over capture timing. Consult the Quickstart for its exact behavior and accepted values before using it.
accept_languages Sets accepted language preferences for the capture. Use when the target site varies content by language.
user_agent Sets the capture browser’s user-agent header. Use only where a specific user-agent is needed; do not assume it can bypass a site’s access controls.

These are configuration trade-offs, not performance guarantees. A viewport-only capture generally fits a compact preview better, while full-page capture prioritizes page coverage over card proportions.

Understand freshness, cache behavior, and usage

The Quickstart documents a default TTL of 2,592,000 seconds (30 days). URL2PNG’s plans page says cached screenshot retrieval does not count against plan usage, while a newly generated screenshot counts as a render; the plans page also says cached screenshots are retained for 30 days. A stable cache key can therefore serve the same captured image during its cache period, while changing unique asks for a different capture.

Rank #4
HP Essential Laptop 2026, Intel CPU, 128GB Storage, Office 365, Windows 11
  • Efficient Performance for Everyday Computing: Powered by Intel N150 processor with up to 3.6 GHz Intel Turbo Boost Technology, 6 MB L3 cache, 4 cores, and 4 threads, this HP laptop delivers responsive performance for web browsing, streaming, document editing, and multitasking. Paired with 4GB LPDDR5 RAM and 128GB UFS storage, it handles daily tasks smoothly. Includes 1-year Microsoft 365 Personal subscription for Word, Excel, PowerPoint, and cloud storage to maximize your productivity.
  • 14-Inch HD Micro-Edge Display:Enjoy clear visuals on the 14-inch HD (1366 x 768) anti-glare screen with 250-nit brightness and 62.5% sRGB coverage. The micro-edge bezel delivers a 79% screen-to-body ratio in a compact design. An HP True Vision 720p HD camera with noise reduction and dual-array microphones supports clear video calls, remote work, and online learning.
  • Modern Connectivity and Wireless Technology: Stay connected with Wi-Fi 6 (2x2) for faster wireless speeds and Bluetooth 5.4 for seamless pairing with accessories. Versatile port selection includes 1 USB Type-C 10Gbps with DisplayPort 1.2 for external displays, 2 USB Type-A 5Gbps ports for peripherals, 1 HDMI 1.4b port, 1 headphone/microphone combo jack, and 1 multi-format SD media card reader. Connect monitors, transfer files quickly, and expand your workspace with ease.
  • All-Day Battery Life and Portable Design: Enjoy up to 11 hours of video playback, 7.5 hours of mixed usage, or 7.5 hours of wireless streaming on a single charge, perfect for students and professionals on the go. Weighing just 3.24 lb and measuring 12.76" x 8.86" x 0.71", this lightweight laptop fits easily in backpacks and bags. The stylish willow green top cover with matte finish and natural silver keyboard deck with vertical brushing pattern offer a modern, professional look.
  • AI-Enhanced Productivity: Access Microsoft Copilot instantly with the dedicated Copilot key for faster assistance. AI Noise Reduction filters background sounds and improves voice clarity during calls. Dual speakers provide clear audio, while the full-size natural silver keyboard and HP Imagepad support comfortable typing and navigation.

Use caching deliberately: long-lived previews reduce fresh renders but can lag behind changes to the target page; forcing new captures improves freshness but uses render allowance. URL2PNG’s live plans page, checked on 2026-10-03, displayed 5,000 fresh screenshots for $29/month, 20,000 for $99/month, and 50,000 for $199/month, plus Enterprise, and said it offered no free accounts. These prices and terms can change, so consult the live page before choosing a plan.

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common integration problems

  • The image request is rejected or does not return an image: verify the API key, secret, token, endpoint path, and PNG route against the current Quickstart. Ensure the token was computed from the exact encoded query string being sent.
  • The token is invalid after adding an option: add the option before signing, then regenerate the token. Any parameter or encoding change after signing makes the token inconsistent.
  • The screenshot URL exposes a credential: move URL construction into server-only code and inspect rendered HTML and network responses. Do not put the secret in client code or a NEXT_PUBLIC_ variable.
  • The screenshot looks cropped: check viewport and fullpage. A viewport capture shows only the browser area; full-page mode attempts to include the document.
  • The screenshot is stale: review the TTL and cache key. Vary unique when a new capture is needed and account for its fresh-render usage.
  • Content is missing because it renders late: try a suitable delay, and review the guide’s timing controls such as say_cheese. More waiting can increase response time, so use it only for targets that need it.
  • Images look soft or too large in the card: align thumbnail_max_width with the display size and set explicit card dimensions or responsive CSS in the host app.
  • Local development works but deployment fails: confirm both credentials exist in the production server environment and that the request runs on the server rather than a browser-only component.

Or skip the browser setup

ScreenshotNeo can return a screenshot from one GET request, in PNG, JPEG, WebP, or PDF formats. Its clean-shot flow accepts cookie/consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with response headers indicating the page verdict and billing status. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

Example cURL request, using a target URL you choose:

Best Value
HP 14 inch Laptop, 2027 Edition, Intel N150 CPU, 4GB RAM, 128GB SSD, 1TB Cloud Storage, Long Battery Life, Win 11 with Microsoft 365
  • 【Powerful Performance】Equipped with an Intel N150 CPU, featuring up to 4.4 GHz, ensuring efficient and powerful multitasking capabilities.
  • 【Versatile Connectivity】Stay connected with multiple ports including USB 3.0 Type-C, USB 3.0 Type-A, and a headphone/mic combo jack, with Wi-Fi and Bluetooth for seamless wireless networking.
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 setup and options. It includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo free.

Frequently Asked Questions

Does URL2PNG provide a Next.js package?

The reviewed URL2PNG documentation gives Node.js examples, not a Next.js-specific package or recipe.

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

Can I use a URL2PNG capture as a social sharing image?

The capture endpoint is for screenshot output; whether it meets a specific social platform’s image and metadata requirements depends on that platform and your implementation.

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.