Chrome DevTools Full Page Screenshots: Limits & Fixes
In this article
Chrome DevTools can capture full-page screenshots, but the built-in tool has a hard limit: it only captures the current viewport height, not the entire scrollable page, for most lazy-loaded content. This limitation exists because the screenshot command captures the visible area, and lazy-loaded images or content below the fold are not rendered until you scroll to them. The fix is to use the built-in "Capture full size screenshot" command, which works for pages that render all content upfront, but for lazy-loaded pages you need to disable lazy loading, use a third-party extension, or use a script to scroll and stitch screenshots.
How the Built-In Full Page Screenshot Works
Chrome DevTools offers a "Capture full size screenshot" option in the command menu (Ctrl+Shift+P or Cmd+Shift+P, then type "screenshot"). This command tells Chrome to resize the viewport to the full scroll height of the page, capture the entire layout, and then restore the viewport. It works seamlessly for pages that load all content immediately, such as static articles or product pages with no lazy loading.
However, the command relies on the page's layout being complete. If the page uses lazy loading (a common technique to defer off-screen images and iframes until the user scrolls near them), the browser hasn't fetched or rendered that content yet. The screenshot therefore captures blank space or placeholder boxes where the lazy content would appear.
Why Lazy Loading Breaks the Screenshot
Lazy loading is a performance optimization that delays loading resources (images, scripts, iframes) until they're needed. On a long page, only the first few viewport heights are loaded initially. When you trigger a full-page screenshot, Chrome resizes the viewport to the full page height, but the browser doesn't automatically scroll through the page to trigger lazy loading. As a result, the screenshot captures the page with only the initially loaded content.
This is a known behavior, not a bug. The DevTools team designed the command to capture the current state of the page, not to simulate scrolling. For pages that use native lazy loading (the loading="lazy" attribute on images) or JavaScript-based lazy loading (like Intersection Observer), the content below the fold is simply not in the DOM or not fully rendered.
Fixes for Lazy-Loaded Pages
There are several reliable methods to capture a full-page screenshot of a lazy-loaded page. Choose based on your comfort with command line and the frequency of your need.
- Disable lazy loading temporarily: In DevTools, open the Rendering tab (Cmd+Shift+P, type "Rendering"), and check "Disable image lazy loading" and "Disable JavaScript". Disabling JavaScript will stop most lazy-loading scripts, but it may also break dynamic content. Disabling only image lazy loading works for native lazy loading but not for JS-based methods.
- Use a headless Chrome command: The
--screenshotflag with--window-sizecan capture a full page, but it still has the same lazy-loading issue. However, you can combine it with--virtual-time-budgetto give the page time to load, though it won't scroll. - Use a third-party extension: Extensions like "Full Page Screen Capture" or "GoFullPage" work by scrolling through the page programmatically, triggering lazy loading, and stitching screenshots together. They are the most reliable for lazy-loaded pages.
- Use a script with Puppeteer: For developers, a Puppeteer script can scroll through the page, wait for resources to load, and then capture a full-page screenshot. This gives full control over the scrolling behavior.
How to Use the Built-In Command Correctly
For pages that don't use lazy loading, the built-in command is simple:
- Open DevTools (F12 or Ctrl+Shift+I).
- Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the command menu.
- Type "screenshot" and select "Capture full size screenshot".
- Chrome will capture the entire page and save it as a PNG file.
If the page uses lazy loading, you can try to force all content to load by scrolling manually to the bottom before using the command. However, this may not work if the page loads content dynamically as you scroll, because the full-page command resets the scroll position.
Common Problems and Misconceptions
A common misconception is that the full-page screenshot is broken or that DevTools can't handle long pages. In reality, it works fine for pages that render everything upfront. The issue is specifically with lazy-loaded content.
Another problem is that some pages use infinite scrolling (e.g., social media feeds), where the page height grows as you scroll. The built-in command captures only the initial height, so you get a screenshot of the first "page" of content. For infinite scroll, you must use a scrolling extension or script.
Also, note that the built-in command may fail on pages with fixed headers or footers that repeat in the screenshot, but this is rare and not related to lazy loading.
Alternatives to DevTools for Full Page Screenshots
If you need full-page screenshots regularly, consider these alternatives:
- Browser extensions: As mentioned, extensions like GoFullPage are user-friendly and handle lazy loading automatically.
- Online services: Websites like Screenshot Machine or URL2PNG can capture full-page screenshots, but they may have the same lazy-loading issue and may not work for pages behind a login.
- Puppeteer or Playwright: These headless browser tools can be scripted to scroll and wait for lazy content, then capture a full-page screenshot. This is the most robust method for developers.
Frequently Asked Questions
Why does my full-page screenshot show blank spaces?
Blank spaces appear because lazy-loaded images haven't been fetched when the screenshot is taken. The browser resizes the viewport, but it doesn't scroll to trigger loading. Use a scrolling extension or disable lazy loading in DevTools to fix this.
Can I capture a full-page screenshot of an infinite scrolling page?
No, the built-in DevTools command captures only the initial viewport height. Infinite scrolling pages grow as you scroll, so you need a tool that scrolls and stitches, like GoFullPage or a custom Puppeteer script.
Does disabling JavaScript in DevTools help with lazy loading?
Yes, but it's a blunt tool. Disabling JavaScript stops all scripts, including lazy-loading logic, but it may also break dynamic content or layout. It's better to use the specific "Disable image lazy loading" option if available.
Is there a way to capture a full-page screenshot from the command line?
Yes, you can use headless Chrome with the --screenshot flag, but it still won't handle lazy loading. To trigger lazy loading, you need to script scrolling, which is easier with Puppeteer.
Why does the screenshot only capture the visible part of the page?
That's the default behavior of the normal screenshot command. The full-size screenshot command is separate and must be selected from the command menu. If you're using the camera icon in the DevTools toolbar, it only captures the viewport.