October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How to Generate Website Thumbnails for a Static HTML Link Page

Capture each destination with Playwright or a screenshot API, save the images in your static site’s assets, and connect them to the matching links.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Generate one screenshot for each destination URL, save each image in your static site’s published assets, and reference it from the matching link card. You can create the images locally with Playwright or request them from a screenshot API. For a static page, save durable copies rather than relying on temporary screenshot URLs.

Choose how to capture the pages

Use Playwright when you want browser automation inside your own project and can maintain its setup. Use a hosted screenshot API when you prefer to send URLs to a service and receive image output. Both routes can produce files for a static page; the right fit depends on where you want capture work and credential management to live.

As an Amazon Associate I earn from qualifying purchases.

Route What it involves Useful controls
Playwright Run browser automation in your project, navigate to each URL, and save screenshots. Viewport or full-page capture, element capture, image type, quality, scale, and capture to a file or buffer. Playwright screenshots guide
Hosted API Make an API request for each page and store the returned image. OpenGraph.io documents format, quality, dimensions, full-page capture, selectors, excluded elements, dark mode, caching, and capture delay. These are documented features, not independently measured performance. OpenGraph.io documentation

The sources do not establish a universal best thumbnail size, refresh schedule, provider cost comparison, or guarantee that any particular destination can be captured.

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

Generate thumbnails locally with Playwright

Playwright’s documented workflow is to navigate a browser page to a URL and call page.screenshot(). A viewport capture is often a useful starting point for a compact link card; full-page images can be unnecessarily tall. Set a consistent viewport and inspect examples from your own destination list, since pages differ in layout.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Capture a URL and save an image

The following Node.js example uses Playwright’s Chromium browser and writes a PNG for each URL. Install Playwright and its browser in your project first, then run the script with Node.

import { chromium } from 'playwright';

const targets = [
  { name: 'example', url: 'https://example.com' },
  { name: 'news', url: 'https://news.ycombinator.com' },
];

const browser = await chromium.launch();
const page = await browser.newPage({
  viewport: { width: 1200, height: 800 },
  deviceScaleFactor: 1,
});

try {
  for (const target of targets) {
    try {
      await page.goto(target.url, {
        waitUntil: 'domcontentloaded',
        timeout: 30000,
      });
      await page.screenshot({
        path: `public/thumbnails/${target.name}.png`,
        type: 'png',
        fullPage: false,
      });
      console.log(`Saved ${target.name}`);
    } catch (error) {
      console.error(`Could not capture ${target.url}:`, error);
    }
  }
} finally {
  await browser.close();
}

Create public/thumbnails before running the script, or change the output path to a directory your static site publishes. The example deliberately catches failures per URL so one inaccessible page does not stop later captures. Choose unique, filesystem-safe names; for larger lists, maintain the target URL and output filename together as data rather than deriving paths directly from arbitrary URLs.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Change the capture shape

  • Viewport screenshot: The default-style capture shown above records the visible browser area. Choose a viewport that resembles the space the thumbnail will occupy.
  • Full-page screenshot: Set fullPage: true when a tall capture is genuinely useful. It includes content beyond the initial viewport and may produce an image poorly suited to a small card.
  • Element screenshot: Locate a specific element and call locator.screenshot({ path: 'public/thumbnails/example.png' }) when the preview should show only part of a page. Selectors can vary or disappear across sites, so handle missing elements.
  • Buffer output: Omit path and use the returned screenshot bytes when another step needs to transform or upload the image. Playwright documents file, buffer, element, and full-page capture in its screenshots guide.
  • Output controls: The screenshot method supports image type, quality where applicable, scale, and animation handling. Verify format-specific behavior in the Page screenshot reference.

Attach generated images to link cards

Keep destination URLs and image filenames associated in the page’s data or markup. Put generated files in the directory your static host publishes; the exact directory depends on your site setup. This file-and-markup approach is an implementation pattern based on screenshot outputs, not a framework-specific rule.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<article class="link-card">
  <a href="https://example.com">
    <img src="/thumbnails/example.png"
         alt="Preview of Example"
         loading="lazy">
    <span>Example</span>
  </a>
</article>

Write alternative text that helps when the image conveys useful information. If the thumbnail is purely decorative and the link text already identifies the destination, use empty alternative text (alt="") to avoid repeating that text for screen readers. Keep the destination link understandable if an image is missing or fails to load.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Use a hosted screenshot API

OpenGraph.io documents a GET screenshot endpoint with parameters for output format, quality, dimensions, full-page capture, CSS selectors, excluded elements, dark mode, caching, and delay. Its documentation identifies link-preview thumbnail generation as a use case. Check the provider documentation for the current endpoint syntax and authentication requirements before wiring it into a build.

Its documented dimension presets are 375 × 812 (xs), 1024 × 768 (sm), 1366 × 768 (md), and 1920 × 1080 (lg); the documented quality range for the listed endpoint is 10–80. The provider says screenshot URLs expire after 24 hours. These service details can change, so verify them before relying on them. Download or cache the image into your own published assets if the static page needs a durable thumbnail.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

A hosted workflow requires API requests and credential handling; local Playwright means maintaining browser automation in your project. The sources reviewed do not establish current prices or quotas for the compared routes, so check provider terms rather than assuming a cost advantage.

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

Refresh the thumbnails deliberately

Generate images when the URL list changes, or run a scheduled refresh if destinations change often. There is no universally correct refresh interval established for this use case. Keep the URL-to-filename mapping stable so your HTML continues to reference the correct asset, and inspect representative outputs after changing viewport, capture settings, or destinations.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Troubleshoot capture and display problems

  • Navigation times out: The destination may be slow, unavailable, or waiting on behavior your chosen navigation condition does not cover. Check that the URL is reachable from the machine running capture; adjust the timeout or wait condition only when appropriate, and record failures rather than silently publishing a broken preview.
  • The image is blank or incomplete: The page may render content after the initial navigation event. Try a suitable wait condition or a deliberate delay, then inspect the screenshot. Do not assume a fixed delay works for every site.
  • A selector capture fails: The selector may not exist on that page or may have changed. Confirm the selector in the rendered page, and use a viewport screenshot as a fallback if a cropped capture is optional.
  • The screenshot is too tall or too small: Check whether full-page capture is enabled and whether the viewport matches the desired card shape. A consistent viewport is usually easier to use in a row or grid than images with unrelated dimensions.
  • The API image link stops working: OpenGraph.io documents that returned screenshot URLs expire after 24 hours. Download and publish a local copy instead of treating that temporary URL as a permanent asset.
  • A thumbnail does not appear on the static site: Check that the generated file is inside the published asset directory, that the image path matches the deployed location, and that the filename’s case matches exactly.
  • Some destinations never capture correctly: Capture success depends on the target page and execution environment. The documented controls do not guarantee that every site permits capture or will load successfully; keep a fallback image or a text-only card for failures.

Or skip the browser setup

ScreenshotNeo is a hosted website screenshot API and MCP server for developers. One GET request can return a screenshot as PNG, JPEG, or WebP, or a PDF. Its capture can accept consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with response headers identifying the page verdict and billing status. AI agents can use its MCP tools to take screenshots, get page information, or capture PDFs.

For example, save a WebP screenshot to a file with cURL:

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

See the ScreenshotNeo API documentation for the key and request options. Its free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

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

Sources

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.