Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon 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 NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How to Capture a Website Screenshot After Lazy-Loaded Images Finish Loading

Trigger lazy loading by scrolling through the page, verify relevant images and page-specific content are ready, then take the full-page screenshot.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scroll through the page to trigger viewport-based lazy loading, wait for the images and any page-specific content you need to become ready, then capture the full page. A full-page screenshot option covers the scrollable page; by itself, it does not guarantee that offscreen images have loaded.

Why a full-page screenshot can still miss images

Browsers commonly defer loading offscreen images until they approach the viewport. A screenshot tool can capture the whole scrollable page without ever bringing every image into view first. The result may include blank image areas or a layout that changes after capture.

As an Amazon Associate I earn from qualifying purchases.

Playwright describes full-page capture as a screenshot of the full scrollable page, and Puppeteer offers a fullPage option. Neither capability, on its own, establishes that every lazy-loaded asset has finished loading. See Playwright’s screenshot documentation and Puppeteer’s ScreenshotOptions interface.

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

Capture after lazy-loaded images load with Playwright

This Node.js example scrolls down in viewport-sized steps, waits briefly at each step, checks ordinary image elements, and then captures the page. It uses Chromium through Playwright.

#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
  1. Install Playwright: run npm install playwright, then npx playwright install chromium.
  2. Save the script: create screenshot.js with the code below.
  3. Run it: use node screenshot.js https://example.com, replacing the URL with the page you want to capture.
const { chromium } = require('playwright');

(async () => {
  const url = process.argv[2];
  if (!url) {
    throw new Error('Usage: node screenshot.js https://example.com');
  }

  const browser = await chromium.launch({ headless: true });
  const page = await browser.newPage({ viewport: { width: 1365, height: 900 } });

  try {
    await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 });

    // Bring successive parts of the document into view to trigger lazy loading.
    await page.evaluate(async () => {
      const pause = ms => new Promise(resolve => setTimeout(resolve, ms));
      const step = Math.max(window.innerHeight, 500);
      let previousHeight = 0;
      let stableHeightCount = 0;

      while (stableHeightCount < 3) {
        const height = document.documentElement.scrollHeight;
        for (let y = 0; y < height; y += step) {
          window.scrollTo(0, y);
          await pause(250);
        }
        window.scrollTo(0, document.documentElement.scrollHeight);
        await pause(500);

        const newHeight = document.documentElement.scrollHeight;
        if (newHeight === previousHeight) stableHeightCount++;
        else stableHeightCount = 0;
        previousHeight = newHeight;
      }

      // Check standard img elements; this does not cover CSS backgrounds
      // or application-specific loading indicators.
      await Promise.all(
        Array.from(document.images, img => {
          if (img.complete) return Promise.resolve();
          return new Promise(resolve => {
            img.addEventListener('load', resolve, { once: true });
            img.addEventListener('error', resolve, { once: true });
            setTimeout(resolve, 10000);
          });
        })
      );

      window.scrollTo(0, 0);
    });

    const imageStatus = await page.locator('img').evaluateAll(images =>
      images.map(img => ({
        src: img.currentSrc || img.src,
        complete: img.complete,
        loaded: img.naturalWidth > 0
      }))
    );
    const failedImages = imageStatus.filter(img => !img.loaded);
    if (failedImages.length) {
      console.warn(`${failedImages.length} img element(s) did not load successfully.`);
    }

    await page.screenshot({ path: 'page.png', fullPage: true });
    console.log('Saved page.png');
  } finally {
    await browser.close();
  }
})();

The script considers the page height stable after three passes without a height change. That is a practical stopping rule, not proof that a page is finished: pages that append content slowly or only after a particular interaction may need a site-specific condition or a defined capture boundary.

Make readiness checks match the page

For ordinary <img> elements, img.complete indicates that loading has finished, while img.naturalWidth > 0 helps distinguish a loaded image from one that failed. The script logs failures rather than silently treating every completed request as a successful image.

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
  • CSS background images: they are not included in document.images. If they matter, check the relevant elements and page state separately.
  • Custom image components: a component may expose its own loading indicator or completion state. Wait for that signal where possible.
  • Infinite scroll: scrolling can keep creating new content. Decide how many items or how much page height to capture, and stop at that boundary.
  • Virtualized lists: some pages remove offscreen items from the document. A full-page screenshot cannot include items that are not present; capture the needed sections separately or use the application’s export method.
  • Interaction-gated content: scrolling will not reveal content that requires a click, consent choice, or other action. Perform the necessary interaction before checking readiness.

Capture with Puppeteer instead

If Puppeteer is already part of your project, use its page screenshot method with fullPage: true after the same scroll-and-readiness workflow. Puppeteer’s screenshot guide demonstrates navigation with waitUntil: 'networkidle2', but that example is not a guarantee that every site’s lazy images or application state are ready. See Puppeteer’s screenshot guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({ headless: true });
  const page = await browser.newPage({ viewport: { width: 1365, height: 900 } });

  try {
    await page.goto('https://example.com', {
      waitUntil: 'domcontentloaded',
      timeout: 60000
    });

    await page.evaluate(async () => {
      const pause = ms => new Promise(resolve => setTimeout(resolve, ms));
      const step = Math.max(window.innerHeight, 500);
      const height = document.documentElement.scrollHeight;

      for (let y = 0; y < height; y += step) {
        window.scrollTo(0, y);
        await pause(250);
      }
      window.scrollTo(0, document.documentElement.scrollHeight);
      await pause(500);

      await Promise.all(Array.from(document.images, img => {
        if (img.complete) return Promise.resolve();
        return new Promise(resolve => {
          img.addEventListener('load', resolve, { once: true });
          img.addEventListener('error', resolve, { once: true });
          setTimeout(resolve, 10000);
        });
      }));
      window.scrollTo(0, 0);
    });

    await page.screenshot({ path: 'page.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

Puppeteer documents Page.screenshot() for capturing screenshots and supports element screenshots as well as full-page capture. If only one component matters, capturing that element can be more useful than rendering an entire long page.

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.

When to use a fixed wait, network idle, or visual stability

  • Fixed delay: simple but fragile. A short delay may miss slow assets; a long one wastes time. Use it as a settling interval after scrolling, not as the only readiness test.
  • Network idle: can be a useful navigation condition, and Puppeteer shows networkidle2 in an example. It does not establish that every offscreen lazy image has been requested, nor that all application rendering is complete.
  • Image completion: checking relevant image elements is more direct for standard images, but does not cover CSS backgrounds, failed requests, or app-specific state.
  • Visual stability assertions: Playwright’s screenshot assertions wait for consecutive screenshots to be visually stable before comparing the latest result. They are available through the Playwright test runner and are for visual comparison; stability does not prove every offscreen asset has been requested. See Playwright PageAssertions.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting missing or incomplete images

Some images are blank

Confirm that the script scrolled far enough to bring the relevant area into view. Check the logged image status: complete can be true even when an image failed, so inspect naturalWidth as well. For CSS backgrounds or custom components, add a page-specific readiness check.

The screenshot stops before the page content ends

Inspect whether the site adds content only after scrolling. The example repeats scroll passes as the document height changes; for slow-loading infinite feeds, define a maximum height, item count, or other stopping condition rather than waiting indefinitely.

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

Layout shifts after the screenshot

Images can change page geometry when they load. Wait for the relevant images and any known page loading indicator, then capture. If content appears only after a later interaction, reproduce that interaction before taking the screenshot.

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

Navigation times out or never becomes idle

Pages with continuing network activity may not reach a network-idle condition. Use an appropriate navigation milestone such as domcontentloaded, then wait for the specific images or application state you need. Increase the navigation timeout only when the page genuinely needs more time; a larger timeout alone does not make missing content load.

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 provides a website screenshot API and MCP server. This one GET request returns an image; see the API documentation for parameters and response details.

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

ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture. The Free plan includes 1,000 shots 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.

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.

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.