October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan 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 desk7 min

How to Generate Retina-Resolution Website Thumbnails for a Directory

Learn how to batch-capture retina-resolution website thumbnails with Playwright or shot-scraper, choose the right capture extent, and keep results consistent.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a browser automation tool to open each directory URL at a fixed CSS viewport, then capture device pixels at a chosen scale. With Playwright, a device scale factor of 2 produces an image twice as wide and twice as tall as the CSS viewport—four times as many pixels—when the screenshot is captured at device scale. Choose viewport, full-page, or element capture based on what each thumbnail needs to show, and keep the browser environment consistent across the batch.

What “retina resolution” means for a website thumbnail

A browser lays out a page in CSS pixels. A device scale factor determines how many image pixels represent each CSS pixel in the captured output. At scale 2, a 480 × 300 CSS-pixel viewport produces a 960 × 600-pixel screenshot when captured at device scale. The image has four times the pixel area, not merely twice the total pixel count.

As an Amazon Associate I earn from qualifying purchases.

Playwright’s screenshot API distinguishes CSS-pixel output from device-pixel output. Its screenshot documentation explains that the scale option can be set to "css" or "device"; device scaling produces one image pixel per device pixel. The browser context’s viewport and device scale factor determine the dimensions to expect, so verify a sample before starting a large batch.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Choose a consistent frame and capture extent

Set the CSS viewport to match the directory card

Decide the thumbnail’s aspect ratio and framing first. For example, a 480 × 300 viewport gives a 16:10 frame; at device scale 2, a device-scale screenshot is 960 × 600 pixels. Those are example dimensions, not a universal directory standard. Match your actual card design, and use the same viewport for every URL.

#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

Playwright supports browser contexts with viewport and device settings; see its emulation documentation. Keep the viewport independent of the output density: changing the device scale factor increases pixel dimensions without changing the CSS layout width.

Choose viewport, full-page, or element capture

  • Viewport: Captures the visible frame. This is usually the most consistent choice for a grid of site previews.
  • Full page: Captures the page’s full scrollable height. Pages can differ dramatically in height, so these images may need a crop or normalized derivative before use in a directory grid.
  • Element: Captures a selected element, such as a hero or preview panel. Use this when that specific region—not the whole page—is the thumbnail’s subject.

Playwright documents these capture options in its screenshot API. Keep the chosen capture extent consistent unless different entries genuinely require different treatment.

Generate a batch with Playwright

The example below reads URLs from a JSON file, opens them in one Chromium browser, and saves PNG screenshots at device scale 2. Install Playwright and its Chromium browser first:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm init -y
npm install playwright
npx playwright install chromium

Create urls.json as an array of objects. Give each entry a stable identifier for its filename and a URL to preserve the mapping back to the directory source:

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
[
  { "id": "example", "url": "https://example.com" },
  { "id": "news-home", "url": "https://news.example.org" }
]

Save this script as capture.js and run it with node capture.js. It captures the initial viewport after navigation reaches domcontentloaded; adjust the wait policy if the pages you capture render important content later.

const fs = require('node:fs/promises');
const path = require('node:path');
const { chromium } = require('playwright');

const entries = require('./urls.json');
const outputDir = path.join(__dirname, 'thumbnails');
const width = 480;
const height = 300;
const deviceScaleFactor = 2;

function safeName(id) {
  return String(id).replace(/[^a-zA-Z0-9_-]+/g, '-').replace(/^-+|-+$/g, '') || 'site';
}

(async () => {
  await fs.mkdir(outputDir, { recursive: true });
  const browser = await chromium.launch({ headless: true });
  const context = await browser.newContext({
    viewport: { width, height },
    deviceScaleFactor
  });
  const page = await context.newPage();
  const results = [];

  for (const entry of entries) {
    const filename = `${safeName(entry.id)}.png`;
    const destination = path.join(outputDir, filename);
    try {
      const response = await page.goto(entry.url, {
        waitUntil: 'domcontentloaded',
        timeout: 30000
      });
      if (!response || !response.ok()) {
        throw new Error(`Navigation response: ${response ? response.status() : 'none'}`);
      }
      await page.screenshot({ path: destination, type: 'png', scale: 'device' });
      results.push({ id: entry.id, url: entry.url, file: filename, status: 'captured' });
    } catch (error) {
      results.push({ id: entry.id, url: entry.url, status: 'failed', error: error.message });
      console.error(`Failed ${entry.url}: ${error.message}`);
    }
  }

  await fs.writeFile(path.join(outputDir, 'manifest.json'), JSON.stringify(results, null, 2));
  await context.close();
  await browser.close();
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

The example reuses a page sequentially to keep the workflow simple and the browser state consistent. It records failures rather than stopping at the first unreachable URL. It writes a manifest that maps identifiers and original URLs to output filenames. The filename sanitizer is intentionally basic; for a production directory, ensure identifiers are unique after sanitization to avoid overwriting files.

Validate dimensions and appearance before scaling up

Check several outputs before processing the entire directory: confirm the pixel dimensions, intended crop, readable text, and whether the top-of-page content has finished rendering. A 480 × 300 viewport at scale 2 should yield 960 × 600 image pixels for this device-scale capture. If the resulting image is still 480 × 300, check the screenshot scale setting and context configuration.

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

Use shot-scraper for a command-line workflow

If you prefer a command-line capture workflow, shot-scraper documents --retina as a shortcut for device scale factor 2, and also documents scale factor 3. Its flags and interface are specific to the installed version, so check that version’s help output before building a batch command. The researched documentation establishes this retina behavior; it does not establish a universal command for every version or a particular directory-processing setup.

Rank #3
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.

For repeated captures, your batch script or shell workflow should retain the source URL-to-file mapping, handle navigation errors per URL, and verify output dimensions. The command-line route is convenient when the desired capture fits its interface; Playwright’s programmable API is suited to workflows that need custom navigation, capture selection, or post-processing.

Normalize files for the directory

Keep raw captures, derivatives, or both

Retina captures may be useful as source files while the directory serves smaller display images. You can retain the original high-density output and generate a normalized derivative sized for the card, or save only the derivative if source captures are not needed. Preserve a manifest linking each file to its original URL and directory entry.

Choose an output format for your actual delivery needs

Playwright supports PNG, JPEG, and WebP screenshots. Select based on downstream compatibility, transparency needs, and storage constraints; no format is best for every thumbnail, and the cited documentation does not supply comparative compression results for this use case. Test representative pages and the actual delivery pipeline before settling on a format.

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

Make batch captures repeatable

  • Hold the environment steady: Use the same browser version, operating-system environment, viewport, device scale factor, and headless configuration. Playwright notes that screenshots can vary with host OS, browser version, settings, hardware, and headless mode; its visual comparison guidance recommends using the same environment as the baseline.
  • Define a page-state policy: Pages may include animation, timestamps, rotating ads, or delayed content. Decide whether to wait for a particular selector or delay, or whether to hide or avoid volatile elements where appropriate. Do not assume that navigation completion means every site has finished rendering its useful content.
  • Use deterministic identifiers: Derive filenames from stable directory IDs rather than raw URLs, which can contain characters unsuitable for filenames or collide after simplification.
  • Track partial failures: Keep a per-entry success or failure record, including the URL and error, so one timed-out site does not erase the results from successful captures.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common problems

Output is not retina-sized

Confirm the browser context uses the intended deviceScaleFactor and the screenshot uses scale: 'device'. At scale 2, each output dimension should be double the CSS viewport dimensions. A CSS-scale capture does not produce that device-pixel output.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • 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

Some thumbnails are blank or incomplete

A page may need more than domcontentloaded before its visible content appears, or it may render key content after a site-specific event. Try waiting for a meaningful selector or an intentional delay suitable for that site, then inspect a sample. Do not make every page wait for network idle without checking behavior; some sites maintain ongoing network activity.

Navigation fails or returns an error response

Check the logged error and response status, confirm the URL is valid and reachable from the machine running the browser, and consider whether the site blocks automated access. Keep failed entries in the manifest for retry or manual review rather than treating them as valid screenshots.

Images have inconsistent framing

Check that all pages use the same CSS viewport and capture extent. Full-page captures naturally vary in height; for consistent directory cards, use a fixed viewport or apply a deliberate, documented crop to normalized derivatives.

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

Repeated runs look different

Keep the browser and host environment stable, and account for page content that changes over time. Playwright’s visual comparison documentation describes environmental variation as a factor in screenshot differences.

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.

Or skip the browser setup

ScreenshotNeo offers a website screenshot API and MCP server for developers. One GET request can return a screenshot or PDF; the call below saves a WebP capture of the target page. See the ScreenshotNeo documentation for request options.

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

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; those cleanup steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month without a card.

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

Frequently Asked Questions

Do I need a retina display to generate retina-resolution thumbnails?

No. The capture is rendered by browser automation at the configured device scale factor; the display used to run the batch is not the source of the image density.

Is there one correct thumbnail size for every directory?

No universal size is established. Choose dimensions and aspect ratio to suit your directory’s card design and delivery requirements.

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 *

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.

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.