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

Puppeteer supports PNG, JPEG, and WebP screenshots. PNG is the documented default; choose another format with the type option, and use the matching file extension when saving to disk. The API’s quality setting applies to JPEG and WebP, not PNG.

Which image formats does Puppeteer support?

The Puppeteer 25.12.0 API reference defines ImageFormat as 'png' | 'jpeg' | 'webp'. The ImageFormat reference lists those supported values.

PNG is the documented default when you do not specify a screenshot type. JPEG and WebP are supported alternatives. Puppeteer’s documentation does not rank these formats for file size, visual fidelity, encoding speed, or compatibility, so check the receiving system’s requirements and compare representative captures if those factors matter.

Choose a format for your output

Format What Puppeteer documents When to consider it
PNG Default screenshot type; the quality option does not apply. Use when you want the documented default or your destination requires PNG.
JPEG Supported format; quality can be set from 0 to 100. Use when your destination accepts JPEG; check the resulting appearance and file size on your own pages.
WebP Supported format; quality can be set from 0 to 100. Use when your destination accepts WebP; check the resulting appearance and file size on your own pages.

For transparency, Puppeteer provides omitBackground, which hides the default white background and allows capture with transparency. The option defaults to false. The cited API material does not give a detailed comparison of transparency behavior across PNG, JPEG, and WebP, so verify the output in the format and consumer you intend to use.

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

Set the format and save the screenshot

Use Page.screenshot() to capture a page. When you provide path, Puppeteer infers the screenshot type from the file extension. Keeping the extension and explicit type consistent makes the requested output clear.

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.goto('https://example.com', { waitUntil: 'networkidle2' });
  await page.screenshot({
    path: 'capture.webp',
    type: 'webp',
    quality: 80,
    fullPage: true,
  });
} finally {
  await browser.close();
}

To save PNG, use path: 'capture.png' and type: 'png', or omit type to use the documented default. For JPEG, use path: 'capture.jpeg' and type: 'jpeg'. The official guide also shows the path-based screenshot pattern and element-level ElementHandle.screenshot() usage: Puppeteer screenshots guide.

What the options mean

  • type selects png, jpeg, or webp; its documented default is png.
  • quality is a number from 0 to 100 and does not apply to PNG. Puppeteer’s API reference does not recommend one universal quality value.
  • omitBackground hides the default white background to allow transparency; its default is false.
  • encoding controls whether screenshot data is returned as base64 or binary. It is separate from the image format.

These option definitions are in the ScreenshotOptions API reference. The API pages identify themselves as Puppeteer 25.12.0; check the documentation for the version you use because supported formats and defaults are versioned details.

Or skip the browser setup

If you need an endpoint rather than managing Puppeteer and a browser, ScreenshotNeo takes a screenshot from one GET request. For example, this cURL command requests WebP output:

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.
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 API documentation for setup and supported parameters. ScreenshotNeo removes cookie banners, popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.

Sign up for ScreenshotNeo’s free plan.

Troubleshoot format and output issues

  • The file is PNG when you expected JPEG or WebP: Set type explicitly and give path the matching extension. With a path, Puppeteer infers the type from the extension.
  • Changing quality has no effect on PNG: This is expected; Puppeteer documents that quality does not apply to PNG. Select JPEG or WebP if you need to use that option, then inspect the output for your page and destination.
  • The destination rejects the image: Confirm which formats it accepts, then save using that format and a matching extension. Supported by Puppeteer does not necessarily mean accepted by your receiving system.
  • The capture has a white background: Set omitBackground: true when you need the default white background hidden, and verify the output in the format and viewer you will use.
  • The screenshot data is not in the expected representation: Check encoding separately from type; base64 and binary describe data encoding, not PNG, JPEG, or WebP.

Compare your own captures when size or appearance matters

The Puppeteer API specifies supported format names and option behavior, but the cited official references do not provide comparative file-size, image-quality, or speed measurements. Capture the same representative page in the formats your destination accepts, then compare file size and appearance at the intended display size. If you rely on transparency, test that case too. This makes the choice specific to your content and delivery system rather than relying on an unsupported universal ranking.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Does Puppeteer support GIF screenshots?

No. The documented screenshot image formats are PNG, JPEG, and WebP.

Is quality a file-size target?

No. Puppeteer documents it as an image quality value from 0 to 100 for formats other than PNG; it does not guarantee a particular file size.

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.