Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › JavaScript

How to Set Screenshot Quality in Puppeteer for JPEG Images

By Freedom251 Team · · 3 min read

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

Set type: 'jpeg' and a quality value from 0 to 100 in the options passed to page.screenshot(). For example, quality: 80 requests a JPEG screenshot at that quality setting:

await page.screenshot({
  path: 'page.jpg',
  type: 'jpeg',
  quality: 80,
});

Puppeteer’s v25.12.0 API documents this range; it does not prescribe a universal best value. Choose one for your needs and inspect the image and file size.

As an Amazon Associate I earn from qualifying purchases.

Set the JPEG format and quality

Pass both type: 'jpeg' and quality to page.screenshot(). The following example writes the image to page.jpg:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const page = await browser.newPage();
await page.goto('https://example.com');

await page.screenshot({
  path: 'page.jpg',
  type: 'jpeg',
  quality: 80,
});

The documented quality range is 0–100. The Puppeteer v25.12.0 API does not identify a recommended value or promise a particular file size at any setting. Treat a value such as 80 as a starting point, not an official preset. Compare results on the pages and capture conditions that matter to your application. See the ScreenshotOptions API reference.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

What the options do

type: 'jpeg'

This explicitly selects JPEG output. Puppeteer also supports PNG and WebP. The ImageFormat reference lists the supported image formats. If you supply a path, Puppeteer can infer the screenshot type from its extension; .jpg and .jpeg paths can indicate JPEG. Setting type explicitly makes the intended format clear. The documented default is PNG.

quality

Set quality to an integer in the documented 0–100 range when taking a JPEG screenshot. A lower or higher number is a quality setting, not a guaranteed file-size target. The API reference supplies no quality-to-size table, so test with representative pages and inspect both the visual result and output size.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

PNG does not use this setting

Puppeteer marks quality as inapplicable to PNG screenshots. If JPEG quality is the goal, explicitly select type: 'jpeg' rather than relying on the default format.

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

Choose a quality value for your use case

There is no single best setting established by Puppeteer’s documentation. To choose one, capture the same page at several values while keeping the viewport, device scale, page state, and other capture options the same. Review the images at their intended display size and compare file sizes. This is a practical evaluation method, not a benchmark or recommendation published by Puppeteer.

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • 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.
  • For screenshots where small details and text appearance matter, inspect those details closely before accepting a lower setting.
  • For storage- or transfer-sensitive workflows, compare the actual output sizes alongside visual quality.
  • Keep the selected value in your screenshot configuration so repeated captures use the same explicit setting.

Or skip the browser setup

ScreenshotNeo provides a screenshot API: send a GET request with a URL to receive an image or PDF, without setting up Puppeteer for this capture. The example below requests a WebP screenshot; ScreenshotNeo also supports PNG, JPEG, and PDF. See the ScreenshotNeo API documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo removes supported cookie and consent banners, newsletter popups, and chat widgets before capture; those cleanup steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server offers screenshot tools for AI clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan.

Troubleshooting

The file is PNG even though quality is set

Check that you passed type: 'jpeg'. A PNG path or relying on the default format can produce PNG, where the quality option does not apply. Use an explicit JPEG type and a .jpg or .jpeg path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

The screenshot call rejects the quality value

Confirm that quality is a number within the documented 0–100 range, and that it is inside the options object passed to page.screenshot(). Check the installed Puppeteer version’s API if its behavior differs from the v25.12.0 reference.

The image looks worse or the file is not smaller than expected

Puppeteer’s API does not guarantee a particular visual result or file size for a quality number. Compare captures of the same page under the same conditions, and select a setting based on the resulting image and size rather than assuming a fixed reduction.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Further reference

The Page.screenshot() method reference documents the method and its return behavior: a screenshot can be written to a path or returned as image bytes (or as a base64 string through the relevant overload). Puppeteer’s Screenshots guide provides broader capture examples.

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.

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

JavaScriptJPEGPuppeteerScreenshotNeoWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.