To test lazy-loaded pages reliably, capture each supported desktop CSS viewport separately, scroll the relevant content into view, wait for its images to finish loading, and then compare the screenshot. A page’s load event alone is not enough: lazy images may still be deferred. Keep the browser and rendering environment consistent between baseline and test runs.
Choose desktop viewport sizes that match your breakpoints
A viewport is the page’s CSS layout width and height, not the screenshot’s output resolution. Pick explicit dimensions that exercise the desktop breakpoints your product supports—for example, 1280×800, 1440×900, and 1920×1080 if those sizes are relevant to your users. These are example test cases, not universal standards.
Test each dimension as its own case or parameterized iteration. Keep the device scale factor separate: it affects screenshot pixel output, while the viewport determines CSS layout. Decide whether the goal is viewport regression or whole-document output before choosing the capture mode.
Make lazy-loaded content load before capture
Native loading="lazy" generally defers an image until it is within a browser-calculated distance from the viewport. JavaScript loaders often use visibility triggers such as Intersection Observer. A window load event can fire while these images are still unavailable, so wait on the images or an application-specific readiness signal instead. See MDN’s image documentation and its lazy-loading guide.
#1 Best Overall
- 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
- Navigate to the page at the target viewport.
- Scroll the section containing deferred content into or near view. For a nested scrolling region, scroll that region rather than only the window.
- Wait until target images report
completeandnaturalWidth > 0, or wait for an application-owned loaded marker. The natural width check helps distinguish a successfully loaded image from a broken one. - If image loading changes layout, wait for the relevant geometry to settle before taking the screenshot.
- Capture and compare the intended viewport using a descriptive baseline name such as
gallery-1280x800.png.
A fixed delay can be useful for a page-specific animation or known delay, but it should not be the only readiness condition. Lazy loading has no single universal distance threshold that you can safely assume across pages and browsers.
Playwright example for multiple desktop viewports
This TypeScript pattern tests the same below-the-fold gallery at three example desktop sizes. Adapt the route, selector, scroll behavior, and readiness check to your application. It is illustrative and is not a claim that the code was executed.
Rank #2
- 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
import { test, expect } from '@playwright/test';
for (const viewport of [
{ width: 1280, height: 800 },
{ width: 1440, height: 900 },
{ width: 1920, height: 1080 },
]) {
test(`visual at ${viewport.width}x${viewport.height}`, async ({ page }) => {
await page.setViewportSize(viewport);
await page.goto('/gallery');
const lazySection = page.locator('[data-testid="below-fold-gallery"]');
await lazySection.scrollIntoViewIfNeeded();
const images = lazySection.locator('img');
await expect.poll(async () => images.evaluateAll((nodes) =>
nodes.every((node) => {
const image = node as HTMLImageElement;
return image.complete && image.naturalWidth > 0;
})
)).toBe(true);
await expect(page).toHaveScreenshot(
`gallery-${viewport.width}x${viewport.height}.png`
);
});
}
Playwright’s toHaveScreenshot() creates a reference image on first use and compares later captures. Its matcher takes screenshots repeatedly until two consecutive captures match, then saves the last one. Review and commit the initial reference deliberately; a generated baseline is not automatically proof that the page looks correct. See Playwright visual comparisons.
Adapt the readiness check to the page
- Nested scroll container: scroll the container that Intersection Observer uses as its root. Scrolling the window may not trigger the loader. Intersection Observer can use the viewport or a configured root, and a positive
rootMargincan trigger loading before an element is visibly onscreen; see MDN’s Intersection Observer documentation. - Images inserted after rendering: wait for the application’s final content state or re-query the target images after insertion. A one-time list taken before the elements exist will not cover later additions.
- Broken images:
completemay be true even if loading failed, which is why checkingnaturalWidth > 0is useful. - Layout shifts: reserve image dimensions with width and height where possible, then wait for the target layout to stabilize before comparison. MDN recommends dimensions for lazy images to help avoid layout shifts.
- Testing deferred behavior itself: assert that the image or request remains deferred before scrolling, then assert its loaded state after the target approaches the viewport. A final screenshot alone does not establish that lazy loading happened at the intended time.
Playwright supports explicit viewport overrides and device emulation; keep those settings intentional rather than relying on whichever defaults happen to be active. See Playwright emulation.
Rank #3
- Incredible Images: The Acer KB272 G0bi 27" monitor with 1920 x 1080 Full HD resolution in a 16:9 aspect ratio presents stunning, high-quality images with excellent detail.
- Adaptive-Sync Support: Get fast refresh rates thanks to the Adaptive-Sync Support (FreeSync Compatible) product that matches the refresh rate of your monitor with your graphics card. The result is a smooth, tear-free experience in gaming and video playback applications.
- Responsive!!: Fast response time of 1ms enhances the experience. No matter the fast-moving action or any dramatic transitions will be all rendered smoothly without the annoying effects of smearing or ghosting. A 120Hz refresh rate speeds up the frames per second to deliver smooth 2D motion scenes in gaming and video.
- 27" Full HD (1920 x 1080) Widescreen IPS Monitor | Adaptive-Sync Support (FreeSync Compatible)
- Refresh Rate: Up to 120Hz | Response Time: 1ms VRB | Brightness: 250 nits | Pixel Pitch: 0.311mm
Viewport screenshots and full-page screenshots test different things
A viewport screenshot checks what is visible at a particular scroll position and CSS size. A full-page screenshot captures the full scrollable document. Use viewport screenshots for responsive visual regression at desktop breakpoints; use full-page capture when the entire document’s output is the subject of the test. Full-page capture does not remove the need to trigger lazy loading or verify that images have loaded. Playwright documents both capture modes and the distinction between CSS-pixel and device-pixel screenshot scaling in its screenshot documentation.
Keep visual comparisons reproducible
Baseline comparisons are meaningful only when rendering conditions are stable. Browser rendering can differ with the host OS, browser version, settings, hardware, power source, and headless mode; Playwright recommends using the same environment as the baseline. Pin the browser version and run both baseline generation and comparisons in a consistent environment. Avoid switching device scale factor, screenshot scale, fonts, or animation settings between runs unless that difference is specifically under test. See Playwright’s visual-comparison guidance.
Rank #4
- 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.
Troubleshoot missing images and unstable screenshots
| Symptom | Likely cause | What to check or change |
|---|---|---|
| Image is missing although navigation completed | The page load event fired before the lazy image was requested or loaded. | Scroll the target into view and wait for complete plus naturalWidth > 0, or an application-specific loaded marker. |
| Scrolling the page does not load images | The images may be observed relative to a nested scrolling container. | Scroll the correct container and check the loader’s Intersection Observer root. |
| Screenshot intermittently differs | Images, fonts, layout, or other rendering inputs may still be changing; the host environment may also differ. | Wait for meaningful readiness and stable geometry, and compare in the same browser and rendering environment as the baseline. |
| Image appears but layout shifts after capture | Image dimensions were not reserved or content is still settling. | Specify image width and height where appropriate and wait for the target geometry to stabilize. |
| Full-page capture has blank areas below the fold | Deferred resources may not have been activated or finished loading during capture. | Scroll through relevant sections, confirm their images are loaded, then capture the full page if whole-document output is the goal. |
Or skip the browser setup
For a one-off screenshot or capture workflow that does not need Playwright assertions, ScreenshotNeo provides a screenshot API and MCP server. A single request can return an image or PDF; for example, this cURL call saves a screenshot:
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 documentation for API parameters. Cookie banners are accepted and removed before capture, along with known consent platforms, newsletter popups, and chat widgets; those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.
Sign up for 1,000 free screenshots a month, with no card required.
Best Value
- 【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.
Frequently Asked Questions
Why do lazy images sometimes load only after I scroll?
The page may defer the image until it approaches the viewport, or use a visibility observer whose configured root is a scroll container.
Does a full-page screenshot test responsive breakpoints?
No. Breakpoint testing requires setting and capturing each CSS viewport size you want to verify.
Quick Recap
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.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors

