October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober 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 Wait for Images and Fonts Before Bulk Page Screenshots

Wait for meaningful page content, bound document.fonts.ready, decode images, and account for lazy loading before taking bulk Playwright screenshots.

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.

For reliable bulk screenshots, wait for the page-specific content you need, then wait for fonts with document.fonts.ready and for images to decode with HTMLImageElement.decode(). For full-page captures, scroll through the intended capture area to trigger lazy loading, then recheck images. Put time limits on readiness waits and record failures; neither the page load event nor img.complete proves that every visible asset is ready.

Why screenshots miss images or use the wrong font

A navigation milestone describes document loading, not necessarily visual readiness. Playwright’s page.goto() waits for the load state by default, but lazy-loaded images may still be deferred until they approach the viewport. Fonts and dynamically added content can also settle after that event. See the Playwright Page API and its discussion of navigation and loading.

As an Amazon Associate I earn from qualifying purchases.

Playwright explicitly discourages using networkidle as a testing readiness signal: it describes a period with no network connections for at least 500 ms and recommends assertions about page state instead. A page can keep making requests for reasons unrelated to the elements you need, or appear quiet while relevant visual work remains. Prefer a page-specific condition, such as the results container becoming visible or a loading indicator disappearing.

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

Use a bounded readiness sequence in Playwright

The following JavaScript pattern is an illustrative starting point, not tested code. Adapt the application-ready condition, scroll behavior, timeout policy, and failure handling to your pages. It waits for document load, scrolls a full-page area to invite lazy content to load, waits up to five seconds for the document font set, then decodes the current set of image elements and reports failures.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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
async function settleImages(page) {
  return page.evaluate(async () => {
    const images = [...document.images];
    return Promise.all(images.map(async (img) => {
      try {
        await img.decode();
        return { src: img.currentSrc || img.src, ok: img.naturalWidth > 0 };
      } catch (error) {
        return { src: img.currentSrc || img.src, ok: false, error: String(error) };
      }
    }));
  });
}

async function prepareForScreenshot(page) {
  // Replace or supplement this with an application-specific readiness condition.
  await page.waitForLoadState('load');

  // For a full page, scroll through the intended document to trigger lazy content.
  await page.evaluate(async () => {
    const step = Math.max(300, window.innerHeight);
    for (let y = 0; y < document.documentElement.scrollHeight; y += step) {
      window.scrollTo(0, y);
      await new Promise(requestAnimationFrame);
    }
    window.scrollTo(0, 0);
  });

  const fonts = page.evaluate(() => document.fonts.ready.then(() => true));
  const fontSettled = await Promise.race([
    fonts,
    new Promise(resolve => setTimeout(() => resolve(false), 5000)),
  ]);

  // Re-inventory after scrolling; dynamic pages may have changed the image set.
  const imageResults = await settleImages(page);
  return { fontSettled, imageResults };
}

const readiness = await prepareForScreenshot(page);
// Log readiness.fontSettled and image failures before deciding how to handle this page.
await page.screenshot({ path: 'page.png', fullPage: true });

In production, put finite limits around the whole sequence as well as individual waits. Decide whether a timeout or failed image means retry, skip, fail the job, or capture with a warning. Do not silently discard decode errors: they are useful signals when diagnosing a batch.

Wait for the application’s content, not just navigation

Before asset checks, wait for the specific content required by the capture. For example, a page might expose a results panel only after client-side rendering completes. A selector wait or assertion tied to that state is more meaningful than assuming that a quiet network or completed navigation means the page is ready.

Wait for fonts, but keep a timeout

document.fonts.ready resolves when the document’s font loading and layout work has settled. It does not by itself establish that the intended font face loaded successfully; when font choice matters, inspect font diagnostics or the rendered result. The bounded wait above returns false when its five-second timer wins, so the caller can log and apply an explicit policy instead of blocking a large batch indefinitely.

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

A reported issue opened September 29, 2026 describes a Linux WebKit 26.6 case in Playwright 1.63.0 where a failed font face left document.fonts.status at loading and screenshot capture timed out while waiting for fonts. This is a version-specific report, not evidence that WebKit captures generally fail; see the reported Playwright issue.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

Decode images and validate the outcome

img.decode() gives you a promise to await for image decoding. The example checks naturalWidth after decoding and records exceptions. Do not rely on img.complete alone: it can be true for a broken image as well as a successfully loaded one. The browser API references document image decoding and the complete property.

Handle lazy loading and dynamic image sets

For a full-page screenshot, a single image inventory taken near the top may miss images that have not yet been requested. Scroll through the portion you intend to capture, allow the page to react, return to the capture position, and inventory/decode images afterward. Native lazy loading defers requests until images are near the viewport; see MDN’s image loading guidance.

The example’s one-frame pause at each scroll position is intentionally modest. Some applications need a longer pause, a selector wait after each region, or an application-specific completion signal. Infinite-scroll pages have no fixed end: define a deliberate capture boundary or stop condition rather than assuming one pass reaches all content. Pages can also append images or change sources during scrolling; repeat the inventory after the relevant content condition, or compare successive inventories until the set stabilizes within a bounded period.

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.

document.images covers HTML image elements, not every possible visual resource. CSS background images, canvas content, video frames, and embedded documents need their own page-specific readiness checks if they matter to the screenshot.

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.

Choose a capture scope and batch failure policy

Playwright can capture the viewport, a full page, or a specific element; choose the scope before deciding what to preload. Its screenshot documentation also describes returning screenshot bytes for processing rather than writing only to a file.

  • Viewport: wait for the visible content and decode the relevant images; scrolling the entire document may be unnecessary.
  • Full page: scroll the intended range to trigger lazy content, then recheck the image set before capture.
  • Element: wait for the target element and any assets inside it; ensure the element’s content is not still changing.

For bulk jobs, make the outcome explicit per URL. A strict workflow fails or retries when required assets are missing; a tolerant workflow captures with a warning and preserves diagnostics. Record at least the readiness outcome, image failures, and whether the font wait timed out so that a visually incomplete capture is distinguishable from a successful one.

Keep visual comparisons reproducible

Screenshot rendering can vary with browser and host environment. When comparing captures across a batch or over time, keep the Playwright/browser version, operating system, viewport, device scale factor, and relevant rendering settings consistent. Playwright documents environment-dependent screenshot variation in its visual comparisons guidance.

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

Or skip the browser setup

If you need screenshots rather than browser orchestration, ScreenshotNeo is a website screenshot API and MCP server. Its one-call API example is:

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
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 parameters and response details. Cookie/consent banners, newsletter popups, and chat widgets are removed before the shot, and each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers say which outcome occurred. Its MCP server gives AI agents tools for taking screenshots, getting page information, and capturing PDFs. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common incomplete captures

The screenshot was taken after load, but images are missing

Check whether the missing images are lazy-loaded or added by client-side code. Wait for the page’s meaningful content condition, scroll the intended capture region, then collect and decode the image inventory again. Review recorded decode() errors and naturalWidth values to separate delayed content from broken assets.

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

networkidle never arrives or still produces an incomplete image

Do not make a generic quiet-network interval your only readiness condition. Follow Playwright’s recommendation to use assertions about page state, then perform explicit font and image checks. Pages with ongoing requests may not become idle, while lazy images may not be requested until scrolling.

The font wait times out

Record the timeout and inspect font loading and the browser/host combination. A timeout should lead to a defined retry, warning, or failure outcome, not an unbounded wait. If the intended font is essential, verify the rendered result or font diagnostics rather than treating a resolved promise as proof of a particular face.

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.

An image reports complete but appears broken

complete is not a success test. Check whether decode() rejects and whether naturalWidth is greater than zero; retain the URL and error in the per-page log.

The scroll pass misses content

Confirm the intended capture boundary and whether the page uses infinite scrolling or appends content asynchronously. Adapt the scroll range and wait for the page’s own signal; repeat the image inventory after content changes instead of assuming one pass triggers every site’s lazy content.

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

Frequently Asked Questions

Can document.fonts.ready prove that a specific font loaded?

No. It indicates that font loading and layout have settled; inspect font diagnostics or the rendered result when a particular face is required.

Does the image decode loop cover CSS background images?

No. It examines HTML image elements. Backgrounds, canvas, video, and embedded content need separate readiness checks if they are part of the capture.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
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.