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 desk5 min

Playwright Full-Page Screenshots: Auto-Scroll to Load Lazy Images

Playwright’s fullPage option captures the scrollable page, but lazy-loaded images may need a separate scroll-and-wait step first.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

fullPage: true captures the full scrollable page, but it is not a documented guarantee that Playwright first scrolls through the page to trigger every lazy-loaded image. To capture those images, scroll through the relevant content, wait for the site to load it, return to the top if needed, and then take the full-page screenshot.

What Playwright’s full-page option does—and does not do

Playwright’s screenshot option fullPage: true captures the full scrollable page rather than only the current viewport. The documentation describes it as a screenshot “as if you had a very tall screen and the page could fit it entirely.” The option defaults to false. See the Playwright screenshots documentation and the Page API reference.

As an Amazon Associate I earn from qualifying purchases.

That capture extent is separate from triggering a site’s lazy-loading behavior. A page may load images only when they approach the viewport; taking a full-page screenshot does not, by itself, promise that those images have been requested or decoded. Scroll through the content before capturing when the page relies on scroll-triggered loading.

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.

Scroll through the page before capturing

This JavaScript example scrolls in viewport-height increments, pauses briefly at each position, and repeats if the document grows. It is a practical pattern to adapt—not a universal lazy-loading algorithm or a Playwright guarantee. Replace the fixed pause with a site-specific readiness check when the application provides one.

#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. Navigate to the target page and wait for an appropriate page or application state.
  2. Scroll through the relevant document area so images and other content can approach the viewport and load.
  3. Return to the top if the screenshot should start there.
  4. Capture the full page and inspect the result for placeholders or missing images.
const step = await page.evaluate(() => window.innerHeight);
let previousHeight = 0;

while (true) {
  const height = await page.evaluate(() => document.documentElement.scrollHeight);
  if (height === previousHeight) break;
  previousHeight = height;

  for (let y = 0; y < height; y += step) {
    await page.evaluate(y => window.scrollTo(0, y), y);
    // Prefer a site-specific readiness condition when available.
    await page.waitForTimeout(200);
  }
}

await page.evaluate(() => window.scrollTo(0, 0));
await page.screenshot({ path: 'page.png', fullPage: true });

The example’s 200 ms pause is illustrative, not a recommended or validated duration. A fixed wait may be too short for a slow image or unnecessarily long for a fast page. If the site exposes a reliable signal—such as a particular image becoming visible or a loading indicator disappearing—wait for that instead.

Handle pages that keep growing

On infinite-scroll pages, scrolling may append more content and increase the document height indefinitely. The loop above can therefore run without reaching a stable height. Use an application-specific stopping condition, such as reaching a known item, loading a defined number of entries, or imposing a maximum number of scroll passes. Decide what content the screenshot is meant to include before capturing.

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

Account for nested and virtualized content

Scrolling the document does not necessarily scroll an inner panel, and a virtualized list may remove off-screen items from the DOM as new ones appear. If the target content lives in a nested scroll container, scroll that container. For virtualized or application-managed content, use the page’s own controls or a known content-ready condition; document-height scrolling alone may not expose every item at once.

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

Capture the full page in JavaScript or Python

JavaScript

After the relevant content has loaded, take a full-page screenshot with Playwright’s documented option:

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.
await page.screenshot({ path: 'screenshot.png', fullPage: true });

Python

In Playwright’s Python API, the corresponding option is full_page=True:

page.screenshot(path="screenshot.png", full_page=True)

These capture calls set the screenshot extent. They do not replace the preceding scroll-and-wait work on pages whose content loads as the user scrolls.

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

Use screenshot assertions for visual regression tests

For visual comparisons in Playwright Test, expect(page).toHaveScreenshot(...) waits for two consecutive page screenshots to produce the same result before comparing against the expected snapshot. This helps stabilize the comparison, but it does not guarantee that lazy-loaded content was triggered beforehand. Screenshot assertions work only with the Playwright test runner. See the PageAssertions API reference.

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

Troubleshooting missing images or incomplete captures

  • Images are blank or placeholders remain: Scroll to their positions before capture and wait for a site-specific load condition. Then inspect the saved image; the full-page option alone does not establish that every image finished loading.
  • The loop never finishes: The page may append content as you scroll. Add a clear stopping condition or maximum number of passes instead of relying only on document height becoming stable.
  • Content inside a panel is missing: The page may use a nested scroll container. Scrolling the window does not necessarily trigger that container’s loading behavior.
  • Some items disappear as others load: The page may virtualize its list, keeping only a portion of the content in the DOM. Use application-specific handling rather than assuming a document scroll will preserve every item for one full-page capture.
  • The result still varies between runs: Replace arbitrary pauses with an application readiness condition where possible. For visual regression tests, screenshot assertions can wait for consecutive captures to match, but they cannot load content that was never triggered.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo offers a screenshot API and MCP server. Its API can capture a URL as an image or PDF; a single request is one option when you do not need to manage a Playwright browser yourself. The request below follows the documented API pattern; see the ScreenshotNeo documentation for request options.

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.
curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://stripe.com 
  -o shot.webp
  • It accepts cookie or 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 or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Responses include X-Page-Verdict and X-Billed headers.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents, including Claude, Cursor, and other MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000 screenshots.

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

Frequently Asked Questions

Does Playwright’s full-page screenshot automatically lazy-load every image?

No. The full-page option sets the capture extent; it does not guarantee that a site’s scroll-triggered loading has run.

Can I use this scrolling pattern unchanged on an infinite-scroll page?

Not safely. Set a site-specific stopping condition or limit, because scrolling may keep adding content and prevent the document height from stabilizing.

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
Crashes, No Sound, or Screen Glitches?Free driver scan
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.