# 11 questions for the Chrome screenshot docs

> Page.captureScreenshot and Puppeteer page.screenshot docs, quoted, then checked in Chrome 153: where they hold, run short, say nothing or are wrong.

Q&A with the docs by Serghei Pogor, founder of CurlShot (https://curlshot.com/about/serghei-pogor). Published 24 November 2026. Page for people: https://curlshot.com/blog/chrome-screenshot-docs-qa

The documents for Page.captureScreenshot and Puppeteer's page.screenshot are mostly right and short. Of 11 questions put to them and checked in Chrome 153.0.8010.12, the docs held on 4, left out a case on 3, said nothing on 3 and were wrong on 1: the protocol says quality is for jpeg only, and webp uses it too. The call does not wait for images, a full page up to 131,071 px tall worked in this Chrome, and CurlShot sends the same options as one request.

## Key facts

- The call does not wait for anything. A picture the server answered after 1,000 ms was missing from 5 of 5 shots taken at once, so the wait belongs in your own code.
- The protocol docs say quality is "jpeg only", yet webp files ranged from 8,004 to 436,500 bytes with it. Puppeteer's "not applicable to png" is the exact wording.
- A clip taller than the window with captureBeyondViewport off returned an image of the full clip size with no error, and white below the window. Turn the flag on for clips that leave the window.
- A full-page capture worked up to 131,071 px and failed with "Page is too large" at 131,072 px in Chrome 153.0.8010.12. The docs name no limit.
- optimizeForSpeed cut a PNG capture from 199 ms to 107 ms and made the file 26% larger. It did nothing for jpeg or webp.
- CurlShot takes the same choices as options on one request, so the lab results above carry over to what you send it.

## How the interview works
Each section is one question, what the documents say (copied exactly, read on 12 November 2026), what a run in Chrome 153.0.8010.12 found, and a verdict: docs hold 4, docs incomplete 3, docs silent 3, run differs 1.

## 1. What do I get back, and in what format?
Verdict: Docs hold.

What the docs say:

> Base64-encoded image data. (Encoded as a base64 string when passed over JSON)
> (Protocol, result data, source 1)

> Image compression format (defaults to png).
> (Protocol, parameter format, source 1)

> The screenshot type will be inferred from file extension.
> (Puppeteer, parameter path, source 3)

What was run: Called the protocol method with no parameters, then with each format, then Puppeteer with a binary result, a base64 result and seven file paths. The format was read from the first bytes of each file, not from its name.

Puppeteer, file written for each path (type left out)

| Path | Bytes say |
| --- | --- |
| a.png | png |
| a.jpg | jpeg |
| a.jpeg | jpeg |
| a.webp | webp |
| a.gif | png |
| a (no extension) | png |
| b.png with type "jpeg" | jpeg |

With no parameters the call returned one field, data, a string of 619,528 characters. Decoded, it was a PNG of 800 x 600 pixels and 464,645 bytes. Each of png, jpeg and webp gave a file of that type; the format gif was refused with "Invalid image format".

Puppeteer returned a Buffer by default (a kind of Uint8Array, as its signature says). With encoding "base64" it returned the same string the protocol returned, character for character.

A path with an unknown extension (a.gif) or none gave a PNG. An explicit type won over the extension.

So: Trust the extension rule only for png, jpg, jpeg and webp. For anything else, set type yourself.

## 2. Does the call wait for the page or its images?
Verdict: Docs silent.

What the docs say:

> Capture page screenshot.
> (Protocol, method description, source 1)

What was run: A page with one 200 x 200 red picture that the server answered after 1,000 ms. Opened it with Puppeteer's goto set to stop at domcontentloaded, took a screenshot at once, waited 1.5 s and took another. Five times. Then once with the default goto, which waits for the load event.

Colour of the picture area, five runs

| Shot | Pixel at the picture | Time of the call |
| --- | --- | --- |
| Straight after domcontentloaded | white (empty) in 5 of 5 | 60 to 75 ms |
| 1.5 s later | red (loaded) in 5 of 5 | - |
| After the default goto | red | goto took 1,110 ms |

The call took what a screenshot takes and returned. It did not wait for the picture that was still on its way, in 5 of 5 runs.

The wait lives in the step before it: goto's load event waited for the picture, and the picture was there.

So: Every wait is your job: a load event, a selector, a fixed delay. The method describes one action and promises nothing about readiness.

## 3. Can it capture what is below the fold?
Verdict: Docs incomplete.

What the docs say:

> Capture the screenshot beyond the viewport. Defaults to false.
> (Protocol, parameter captureBeyondViewport (experimental), source 1)

What was run: A 3,000 px page made of flat colour bands (one colour per 1,000 px) in a 800 x 600 window. Four calls, and a pixel read at 100, 1,500 and 2,900 px down to see which band each held.

Image size and what was in it

| Call | Image | Band at 100 / 1,500 / 2,900 px |
| --- | --- | --- |
| No parameters | 800 x 600 | viewport only |
| captureBeyondViewport true, no clip | 800 x 3,000 | band 1, 2, 3 (all right) |
| clip of the whole page, captureBeyondViewport true | 800 x 3,000 | band 1, 2, 3 (all right) |
| clip of the whole page, captureBeyondViewport false | 800 x 3,000 | band 1, then white, then white (the cut is at 600 px, the window height) |

The default gave the window only: 800 x 600, as the docs say.

Setting the flag with no clip gave the whole 3,000 px page, which the docs do not spell out.

The surprise is the last row: a clip taller than the window with the flag off still produced an image 3,000 px tall. Only the first 600 px, the window, held the page; the rest was white. No error was raised.

So: A white block at the foot of a clipped capture is the sign that the flag was off. Turn it on whenever the clip leaves the window.

## 4. Does fullPage give me the whole page?
Verdict: Docs incomplete.

What the docs say:

> When `true`, takes a screenshot of the full page.
> (Puppeteer, option fullPage, source 3)

What was run: The same 3,000 px banded page with fullPage true, with fullPage true and captureBeyondViewport false, and with a clip added.

Puppeteer calls on the banded page

| Call | Result |
| --- | --- |
| fullPage: true | 800 x 3,000, bands right at the top and the foot |
| fullPage: true, captureBeyondViewport: false | 800 x 3,000, window back to 800 x 600 afterwards |
| fullPage: true with clip | error: 'clip' and 'fullPage' are mutually exclusive |

fullPage did give the whole page, 800 x 3,000, with the right colour at the top and at the foot.

With the flag off, Puppeteer made the window as tall as the page for the shot and put it back after. The page sees a resize meanwhile, so a layout that reacts to height can change.

The option page never says that clip and fullPage cannot be combined. The code throws when they are.

So: Leave the flag at its default for full pages. Pick a clip or fullPage, never both.

## 5. Does a clip below the fold work by default?
Verdict: Docs hold.

What the docs say:

> `false` if there is no `clip`. `true` otherwise.
> (Puppeteer, option captureBeyondViewport, default, source 3)

What was run: A 100 x 100 clip at y = 2,000 on the banded page (the third band) in a 800 x 600 window: through Puppeteer with the option left out, through Puppeteer with it set to false, and through the protocol with it set to false.

Clip at y = 2,000

| Call | Result |
| --- | --- |
| Puppeteer, option left out | 100 x 100, third band (right) |
| Puppeteer, captureBeyondViewport: false | error: Cannot take screenshot with 0 height. |
| Protocol, flag false | 100 x 100, all white |

The default flipped as documented: the clip below the fold came back with the right band.

Forcing the flag off made Puppeteer cut the clip to the window first, which left nothing, and it threw. The raw protocol call did not throw: it returned a white image of the size asked for.

So: Do not set the flag to false when you use a clip. Through the raw protocol, check the pixels yourself.

## 6. How tall can a full-page capture be?
Verdict: Docs silent.

What the docs say:



What was run: Full-page captures of banded pages, 400 px wide, from 8,000 to 65,536 px tall, each with the colour at the foot checked. Then a search for the edge with pages 100 px and 400 px wide, and three very wide short pages.

Full-page PNG, 400 px wide

| Page height | Foot colour right | File | Time |
| --- | --- | --- | --- |
| 8,000 px | yes | 26,235 bytes | 497 ms |
| 16,000 px | yes | 52,386 bytes | 531 ms |
| 16,384 px | yes | 53,651 bytes | 580 ms |
| 16,385 px | yes | 53,655 bytes | 510 ms |
| 20,000 px | yes | 65,461 bytes | 778 ms |
| 32,768 px | yes | 107,217 bytes | 1,065 ms |
| 40,000 px | yes | 130,856 bytes | 1,304 ms |
| 65,536 px | yes | 214,353 bytes | 3,125 ms |

Every height up to 65,536 px came back whole. The file and the time grew with the height: 497 ms at 8,000 px, 3,125 ms at 65,536 px. Nothing changed at 16,384 px.

The edge was at 131,072 px. A page 131,071 px tall worked, one pixel more failed with "Page is too large", at 100 px wide and at 400 px wide alike. Pages up to 20,000 px wide, 300 px tall, worked.

Those are limits of this Chrome build on this server, found by probing. A service puts its own, much lower, limits on top.

So: Before you build on a number, find it yourself in your Chrome. Cap the height on your side so one endless page cannot exhaust memory.

## 7. What size is the image when I clip and scale?
Verdict: Docs incomplete.

What the docs say:

> Rectangle width in device independent pixels (dip).
> (Protocol, type Viewport, width, source 1)

> Page scale factor.
> (Protocol, type Viewport, scale, source 1)

What was run: A 200 x 100 clip in windows with a device scale factor of 1, 2 and 3, each with clip scale 0.5, 1 and 2, through the page’s own protocol session. The size of each PNG was read from its header.

Image size of a 200 x 100 clip

| Device scale factor | clip scale 0.5 | clip scale 1 | clip scale 2 |
| --- | --- | --- | --- |
| 1 | 100 x 50 | 200 x 100 | 400 x 200 |
| 2 | 200 x 100 | 400 x 200 | 800 x 400 |
| 3 | 300 x 150 | 600 x 300 | 1,200 x 600 |

Every cell is 200 x 100 times the clip scale times the device scale factor. The docs give the units of the clip (dip) and name the scale, but never say that the file is bigger on a dense screen.

A first try gave 200 x 100 where 400 x 200 was right: it had called the method through a second protocol session, which does not carry the first session’s window emulation. The numbers above use the page’s own session.

So: Work out the file size as clip x scale x device scale factor before you store thousands of them.

## 8. Which formats does quality apply to?
Verdict: Run differs.

What the docs say:

> Compression quality from range [0..100] (jpeg only).
> (Protocol, parameter quality, source 1)

> Quality of the image, between 0-100. Not applicable to `png` images.
> (Puppeteer, option quality, source 3)

What was run: The same noisy test picture as png, jpeg and webp at quality 0, 25, 50, 75 and 100 through the protocol, plus values outside the range, plus the same through Puppeteer.

File size in bytes by quality, protocol call

| Format | q 0 | q 25 | q 50 | q 75 | q 100 | quality left out |
| --- | --- | --- | --- | --- | --- | --- |
| png | 464,645 | 464,645 | 464,645 | 464,645 | 464,645 | 464,645 |
| jpeg | 5,291 | 24,769 | 39,962 | 61,203 | 337,459 | 70,911 |
| webp | 8,004 | 22,380 | 32,054 | 42,586 | 436,500 | 50,814 |

The protocol says jpeg only, and webp answers too: 8,004 bytes at 0 and 436,500 at 100. Puppeteer's wording, "not applicable to png", is the accurate one. The PNG did not change by a byte.

Values outside 0 to 100 (-1, 101, 1000) were not refused by the protocol: they gave the same file as leaving quality out. Puppeteer throws instead, for any quality above 100 or below 0, and for any quality on a png.

So: Use quality for jpeg and webp. Check the range yourself if the value comes from a user.

## 9. Does optimizeForSpeed make it faster, and what does it cost?
Verdict: Docs hold.

What the docs say:

> Optimize image encoding for speed, not for resulting size (defaults to false)
> (Protocol, parameter optimizeForSpeed, source 1)

What was run: 15 pairs of calls on the same noisy picture for each format, one with the flag off and one with it on, in turn. Median time of the call, and the size of the file.

Median of 15 runs

| Format | Time, flag off | Time, flag on | Bytes, flag off | Bytes, flag on |
| --- | --- | --- | --- | --- |
| png | 199 ms | 107 ms | 464,645 | 586,708 |
| jpeg | 61 ms | 60 ms | 70,911 | 70,911 |
| webp | 133 ms | 135 ms | 50,814 | 50,814 |

For PNG the call took 107 ms instead of 199 ms, and the file was 26% larger (586,708 bytes instead of 464,645).

For jpeg and webp the flag changed neither the time nor the size. The docs do not say it is a png matter.

So: A trade of time for bytes, for png only. If you store or send many files, the 26% matters more than the 92 ms.

## 10. How do I get a transparent PNG?
Verdict: Docs hold.

What the docs say:

> Hides default white background and allows capturing screenshots with transparency.
> (Puppeteer, option omitBackground, source 3)

> Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.
> (Protocol, Emulation.setDefaultBackgroundColorOverride, source 2)

What was run: A page with a red 100 x 100 box and nothing else, a 300 x 200 window. The colour of an empty corner, read with Puppeteer’s option and with the protocol alone, with and without the override.

Colour of an empty corner (red, green, blue, alpha)

| Call | Corner |
| --- | --- |
| Puppeteer, default | white (255, 255, 255), opaque |
| Puppeteer, omitBackground: true | transparent (alpha 0) |
| Puppeteer, default, right after | white again |
| Puppeteer, omitBackground with type jpeg | white |
| Protocol, nothing set | white |
| Protocol, after the override with alpha 0 | transparent |
| Protocol, after clearing the override | white |

The protocol's screenshot method has 6 parameters, and none is about the background. The option is Puppeteer's: it sets the override, takes the shot and clears it, so the next shot is white again.

The red box kept its colour (230, 25, 75, 255) in the transparent shot. JPEG has no alpha, so there the option changed nothing.

So: Transparency needs png or webp, and a page that does not paint its own background. If you use the protocol alone, set the override first and clear it after.

## 11. What does fromSurface change?
Verdict: Docs silent.

What the docs say:

> Capture the screenshot from the surface, rather than the view. Defaults to true.
> (Protocol and Puppeteer, parameter fromSurface (experimental), source 1)

What was run: The same page with the parameter left out, set to true and set to false, through the protocol and through Puppeteer. The base64 strings were compared character by character.

Result by value

| Value | Image | Same as the default? |
| --- | --- | --- |
| left out | 800 x 600, 464,645 bytes | - |
| true | same | identical string |
| false | same | identical string |
| false, through Puppeteer | same size | yes |

In headless Chrome on this server the three calls returned the same image, byte for byte.

The docs say where the pixels come from, not when it matters. One run in one browser does not show a difference, and it does not prove there is none elsewhere, for instance in a window with a screen.

So: Leave it alone unless a capture of your own page comes out wrong, and then test both values.
## How it was run
On 12 November 2026. Puppeteer 25.17.0 (puppeteer-core) drove Chrome 153.0.8010.12 in headless mode on a Linux server. Test pages came from a local server and were small and made for one question each. Raw protocol calls went through a CDP session of the same page; image sizes were read from the file headers, and colours from single pixels decoded with sharp. Nothing was sent to a service. The pages are small and made for one question each, so the numbers show what Chrome did with that page, not with yours. The protocol text was read from the JSON file the protocol viewer is built from, and the Puppeteer text from its API reference.
## Using the same options with CurlShot
CurlShot runs the browser for you, so you send options instead of protocol calls: format, image_quality (1 to 100, default 80, for jpeg and webp), omit_background (refused for jpeg), device_scale_factor, full_page, full_page_max_height (20,000 px by default, 30,000 at most), the clip_x, clip_y, clip_width and clip_height options, wait_until (default load), delay and wait_for_selector.

## Questions

### Does Page.captureScreenshot wait for the page to finish loading?

No. Its description is one line, "Capture page screenshot." In a run on 12 November 2026, a screenshot taken straight after domcontentloaded missed a picture that was still loading in 5 of 5 runs, and one taken after the load event had it. Wait for what you need before you call it. CurlShot has wait_until, delay and wait_for_selector for that.

### Does the quality parameter work for webp?

Yes in Chrome 153.0.8010.12, though the protocol docs say "jpeg only". A webp capture was 8,004 bytes at quality 0 and 436,500 bytes at 100. A png did not change. Puppeteer's docs say "not applicable to png", and it throws for a quality on a png.

### How do I take a transparent screenshot with Puppeteer?

Set omitBackground to true and use png or webp, on a page that does not paint its own background. The protocol method has no such parameter: Puppeteer sets Emulation.setDefaultBackgroundColorOverride with alpha 0, takes the shot and clears the override. A jpeg has no alpha and stays white.

### How tall can a full-page screenshot be?

The docs give no limit. In Chrome 153.0.8010.12 headless, a page 131,071 px tall was captured whole and one of 131,072 px failed with "Page is too large", at 100 px wide and at 400 px wide. A hosted service sets its own, lower, limit: CurlShot stops at 20,000 px by default and 30,000 px at most.

### What size is the image when I use clip with scale?

The clip width times the clip scale times the device scale factor, and the same for the height. A 200 x 100 clip at a device scale factor of 2 and a clip scale of 1 gave 400 x 200 pixels. The docs give the unit of the clip as device independent pixels but do not state this.

## Sources

1. Chrome DevTools Protocol, "Page.captureScreenshot (Chrome DevTools Protocol, tip-of-tree)": https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot (checked 12 November 2026)
2. Chrome DevTools Protocol, "Emulation.setDefaultBackgroundColorOverride (Chrome DevTools Protocol, tip-of-tree)": https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setDefaultBackgroundColorOverride (checked 12 November 2026)
3. Puppeteer, "ScreenshotOptions interface": https://pptr.dev/api/puppeteer.screenshotoptions (checked 12 November 2026)
4. Puppeteer, "Page.screenshot() method": https://pptr.dev/api/puppeteer.page.screenshot (checked 12 November 2026)
5. Puppeteer, "ScreenshotClip interface": https://pptr.dev/api/puppeteer.screenshotclip (checked 12 November 2026)

## Go deeper

- [Puppeteer and Playwright screenshots as an API](https://curlshot.com/tools/puppeteer-screenshot-api)
- [Screenshot API](https://curlshot.com/tools/screenshot-api)
- [All options](https://curlshot.com/docs/options)
- [Pricing](https://curlshot.com/pricing)

## Read next

- [Screenshot API vs headless browser: the real cost](https://curlshot.com/blog/screenshot-api-vs-headless-browser.md): A cost calculator with every assumption editable, the hidden work behind headless Chrome, and an honest checklist for build or buy.
- [Website screenshot code examples in 8 languages](https://curlshot.com/blog/screenshot-code-examples.md): The shortest working code to save a full-page screenshot of a website in curl, Node.js, Python, PHP, Go, Ruby, Java and C#, side by side.
- [Why website screenshots look wrong, and the fixes](https://curlshot.com/blog/why-website-screenshots-look-wrong.md): A field guide to 11 ways a website screenshot goes wrong, from blank lazy images to cookie banners and cut-off pages, with the cause and the fix for each.
