Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsPuppeteer supports PNG, JPEG, and WebP screenshots. PNG is the documented default; to choose JPEG or WebP, set the type option and use a matching file extension. The current API reference consulted here is labeled Puppeteer 25.12.0, so check the documentation for the version you use.
Which image formats does Puppeteer support?
Puppeteer’s current ImageFormat type lists three values: png, jpeg, and webp. The API reference is labeled version 25.12.0. These are the documented screenshot image formats; the separate encoding option controls whether screenshot data is returned as Base64 or binary, not which image format is produced.
As an Amazon Associate I earn from qualifying purchases.
What is the default screenshot format?
The documented default for ScreenshotOptions.type is png. A basic capture can therefore omit type and save to a PNG path:
await page.screenshot({ path: 'capture.png' });
When you provide path, Puppeteer says it infers the screenshot type from the file extension. For clear, predictable code, make the extension and explicit type agree rather than relying on an accidental mismatch. See the ScreenshotOptions API reference.
#1 Best Overall
How to save a screenshot as PNG, JPEG, or WebP
After navigating to the page, call page.screenshot() with the desired type and a path with the matching extension. These examples follow the documented option names; check the API for the Puppeteer version installed in your project.
PNG
await page.screenshot({ path: 'capture.png', type: 'png' });
PNG is the documented default, so specifying type: 'png' is optional when the path ends in .png.
JPEG
await page.screenshot({ path: 'capture.jpg', type: 'jpeg', quality: 80 });
Puppeteer documents quality as a number from 0 to 100 for formats to which the option applies. Its API specifically says quality does not apply to PNG. The documentation does not prescribe a universal JPEG quality value; choose one by checking the resulting appearance and file size for your own page and use case.
Rank #2
WebP
await page.screenshot({ path: 'capture.webp', type: 'webp', quality: 80 });
WebP is a documented format option. As with JPEG, the API describes the quality range but does not recommend a particular setting or provide a format comparison. Confirm that the system receiving the file accepts WebP.
Choose a format for the destination
The Puppeteer references establish which formats and options are supported, but they do not compare output size, visual fidelity, encoding speed, or compatibility across destinations. Choose based on the receiving system’s requirements, whether transparency is needed, and your own tests with representative pages.
- Use PNG when you want the documented default or the destination specifically requires PNG.
- Use JPEG or WebP when the destination accepts that format and you have checked the resulting image and file size for your page.
- Test the actual workflow if format compatibility, appearance, or file weight matters. Do not assume one format is universally smaller, sharper, faster, or more compatible.
Transparency and other screenshot options
omitBackground hides the default white background and allows a screenshot with transparency. It defaults to false. For example:
Rank #3
await page.screenshot({ path: 'capture.png', type: 'png', omitBackground: true });
The consulted API reference does not give a detailed comparison of transparency behavior across PNG, JPEG, and WebP, so verify the output format against the needs of your downstream software.
Do not confuse encoding with type: the API documents encoding separately as base64 or binary. Use type to select the image format.
Capture an element instead of the whole page
If you only need one element, the official Puppeteer screenshot guide also documents ElementHandle.screenshot(). The format options are passed to the screenshot call, for example:
Rank #4
const element = await page.$('#receipt');
if (!element) throw new Error('Could not find #receipt');
await element.screenshot({ path: 'receipt.webp', type: 'webp' });
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If you need an image or PDF without managing a Puppeteer browser, ScreenshotNeo provides a website screenshot API and MCP server. One GET request can return PNG, JPEG, WebP, or PDF. Its API can accept consent banners and remove 60+ known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status.
For an image response, use the documented endpoint and replace the example target URL with the page you want to capture. See the ScreenshotNeo API documentation for request parameters and options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month with no card required; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Can Puppeteer return screenshot data instead of saving a file?
Yes. The API has a separate encoding option for Base64 or binary output; it does not select PNG, JPEG, or WebP.
Does Puppeteer recommend a particular JPEG or WebP quality value?
No universal value is specified in the cited API documentation. Test representative pages and choose based on the appearance and file size your workflow needs.
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.




