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.

For a high-resolution Playwright image, set scale: "device" and define the emulated deviceScaleFactor explicitly. The scale controls how many output pixels represent each CSS pixel; the viewport controls the page’s CSS layout. Then choose the capture scope—viewport, full page, clip rectangle, or element locator—and either save the file or process the returned bytes.

The complete, reproducible pattern is:

import { chromium } from 'playwright';

const browser = await chromium.launch();
const context = await browser.newContext({
  viewport: { width: 1280, height: 800 },
  deviceScaleFactor: 2,
});
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.screenshot({ path: 'capture.png', scale: 'device' });
await browser.close();

A factor of 2 is an example, not a universal quality setting. It creates two device pixels for each CSS pixel in the emulated context, so a 1280-pixel-wide CSS viewport can produce an image about 2560 pixels wide. The final dimensions also depend on the selected capture area and page content. Playwright documents these controls in its Page API, screenshots guide, and emulation guide.

Understand what “high resolution” means in Playwright

Playwright separates layout size from image-pixel density:

  • Viewport: the CSS width and height used to lay out the page.
  • Device scale factor: the emulated relationship between CSS pixels and device pixels.
  • Screenshot scale: whether the output uses CSS-pixel dimensions or device-pixel dimensions.

With scale: "device", Playwright captures one image pixel per device pixel. On a high-DPI context, that produces a larger image than scale: "css", which uses one image pixel per CSS pixel. High resolution therefore means retaining device-pixel detail; it does not automatically make text or layout physically larger.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Dell 27 Monitor S2725QS, 4K UHD IPS, 120Hz, 5ms, FreeSync Premium
  • Improved ComfortView Plus: Reduces harmful blue light emissions to ≤35%, for all-day comfort without sacrificing color accuracy.
  • Refresh rate: A smooth, tear-free experience with AMD FreeSync Premium (refresh rate up to 120Hz) and an ultra-low 0.03ms response time create a captivating experience for work and play.
  • Vivid colors: Immerse yourself in breathtaking 4K visuals with in-plane switching technology. Enjoy vibrant colors with 99% sRGB. The 1500:1 contrast ratio and HDR readiness deliver excellent depth and detail.
  • Re-engineered sound quality: Enjoy more detailed sound with spacious audio featuring greater output power, deeper frequency response and more decibel range than the previous generation.
  • Ultra-thin bezel: Designed with a sleek, modern aesthetic and an ash white finish, this display features ultra-thin bezels for a refined, minimalist design.

The Page screenshot reference documents "device" as its default for regular screenshots, while screenshot assertions use a different documented default. Specify the value yourself whenever images are compared, archived, or passed to another tool.

Choose the capture area before writing code

Goal Playwright option Result
Visible screen only No area option The current viewport.
Entire scrollable document fullPage: true A full-page image, including content below the fold.
Known rectangle clip: { x, y, width, height } A bounded region in page coordinates.
One component locator.screenshot() The element’s rendered bounds, useful for cards, charts, or panels.

Area and scale are independent decisions. A full-page screenshot can be device-scaled, and an element screenshot can use CSS or device scaling. Use the smallest area that answers your visual-review or image-processing need; it keeps files and downstream work manageable.

Set up a deterministic high-resolution capture

Install Playwright and browsers

  1. Install the package in your project: npm install -D playwright.
  2. Install the browser binaries required by your project: npx playwright install.
  3. Run the script with Node.js using an environment where the target URL is reachable.

The examples below use Playwright’s library API rather than the test runner, so they can be used in a standalone capture job.

Define viewport and device scale factor

const context = await browser.newContext({
  viewport: { width: 1440, height: 900 },
  deviceScaleFactor: 2,
});

Keep these values in configuration when you need repeatable output. Changing the viewport can trigger different responsive breakpoints; changing the scale factor changes output pixel density without changing the CSS layout.

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

Wait for the page state you actually need

await page.goto(url, { waitUntil: 'networkidle' });
await page.waitForSelector('[data-ready="true"]');

Use a selector wait when the application exposes a reliable ready marker. A fixed delay can be appropriate for a known animation, but it is less robust than waiting for the condition that makes the page visually complete.

Rank #2
Sale
LG 27US500-W Ultrafine Monitor 27-Inch 4K UHD (3840x2160) HDR10 IPS Borderless Design Reader Mode Flicker Safe Switch App HDMI DisplayPort - White
  • 4K UHD with 1000:1 Contrast Ratio - This UltraFine display with a 1000:1 contrast ratio displays deeper blacks and vivid colors in UHD clarity. With wide viewing angles, it gives creative professionals the ability to view and work with highly-detailed, digital imagery.
  • 4K HDR10 DCI-P3 - Explore HDR10 content the way it was meant to be seen with up to 90% DCI-P3 color gamut expression—an elevated color spectrum that brings brilliant color to life.
  • Onscreen Control - You can customize the workspace by splitting the display or adjusting basic monitor options with just a few mouse clicks.
  • Ergonomic Stand - The ergonomic stand makes it easy to flexibly adjust the tilt of the screen in the optimal position for you.
  • What's In The Box - Stand Body, Stand Base, Screws, Power Adapter, HDMI Cable, Quick Start Guide, Registration Card, Warranty.

Runnable screenshot recipes

Viewport screenshot saved to PNG

import { chromium } from 'playwright';

const url = 'https://example.com';
const browser = await chromium.launch();
const context = await browser.newContext({
  viewport: { width: 1280, height: 800 },
  deviceScaleFactor: 2,
});
const page = await context.newPage();
await page.goto(url, { waitUntil: 'networkidle' });
await page.screenshot({
  path: 'viewport-device.png',
  scale: 'device',
  type: 'png',
});
await browser.close();

Full scrollable page

await page.screenshot({
  path: 'full-page.png',
  fullPage: true,
  scale: 'device',
  type: 'png',
});

fullPage captures the document’s full scrollable area. It is not a substitute for increasing device scale: use both when you need every section and device-pixel detail.

Clip a rectangle

await page.screenshot({
  path: 'hero-region.png',
  clip: { x: 80, y: 120, width: 900, height: 500 },
  scale: 'device',
});

The clip coordinates describe a rectangle in the page’s coordinate system. Ensure the rectangle is inside the rendered page and has positive width and height.

Capture one element

const chart = page.locator('#revenue-chart');
await chart.screenshot({
  path: 'revenue-chart.png',
  scale: 'device',
});

Locator screenshots are useful when a full page would include irrelevant navigation, ads, or whitespace. The locator must resolve to a visible element; wait for it if it is rendered asynchronously.

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

Keep bytes in memory for image processing

const image = await page.screenshot({
  fullPage: true,
  scale: 'device',
  type: 'png',
});
// image is a Buffer. Pass it to your image-processing pipeline.

Omit path when another function, object store, or processing library should receive the returned buffer. Supplying path writes a file artifact instead.

PNG, JPEG, and WebP choices

  • PNG: lossless and suitable for text, diagrams, UI comparisons, and further processing.
  • JPEG: smaller for photographic pages, but lossy compression can change fine edges and text.
  • WebP: an efficient alternative when your consumers support it.

Choose the format based on the next system in your pipeline, not just the source page. A larger device-scaled PNG can consume substantially more storage than a CSS-scaled or compressed image, especially for full-page captures.

Rank #3
Sale
Dell 32 Monitor S3225QS, 4K UHD VA, 120Hz, FreeSync Premium, Eye Comfort
  • Improved ComfortView Plus: Reduces harmful blue light emissions to ≤35%, for all-day comfort without sacrificing color accuracy.
  • Refresh rate: A smooth, tear-free experience with AMD FreeSync Premium (refresh rate up to 120Hz) and an ultra-low 0.03ms response time create a captivating experience for work and play.
  • Vivid colors: Immerse yourself in 4K visuals with a VA panel. Enjoy true-to-life colors with 99% sRGB and 95% DCI-P3 coverage. The 1500:1 contrast ratio and HDR readiness deliver excellent depth and detail.
  • Re-engineered sound quality: Enjoy more detailed sound with spacious audio featuring greater output power, deeper frequency response and more decibel range than the previous generation.
  • Ultra-thin bezel: Designed with a sleek, modern aesthetic and an ash white finish, this display features ultra-thin bezels for a refined, minimalist design.

Common high-resolution problems and fixes

The image is the same size as the CSS viewport

Check both settings. scale: "device" controls screenshot output, while deviceScaleFactor controls the emulated device. If the factor is 1, device scaling can equal CSS scaling. Also verify that you are inspecting the newly written file rather than an older artifact.

Text looks blurry despite device scaling

  • Wait until web fonts have loaded and the page has reached its visual-ready state.
  • Use PNG for comparison work instead of a lossy format.
  • Confirm that CSS transforms or a canvas inside the page are not rendering low-resolution content themselves.
  • Keep viewport and scale settings constant between captures.

Full-page output misses lazy-loaded images

Make the application load content as you scroll, or explicitly wait for the relevant images and selectors before the capture. fullPage: true selects the full scrollable document; it does not guarantee that every application-controlled lazy request has completed.

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

The screenshot is unexpectedly enormous

A high device scale factor multiplies output pixels in both dimensions. Combine that with fullPage: true and a long page and the file can become very large. Capture a locator or clip, reduce the viewport only if it still represents the layout you need, or use scale: "css" when device-pixel detail is not required.

The locator screenshot fails

Typical causes are a selector that matches nothing, an element that is detached during a re-render, or an element that is not visible. Wait for a stable, unique locator, then capture it after the component finishes rendering.

Different code paths produce different pixels

Regular page screenshots and test screenshot assertions document different defaults. Set scale explicitly in every path and keep the same browser, viewport, device scale factor, fonts, and page-ready condition.

Rank #4
Samsung 27" Odyssey G5 (G51F) Series QHD (1440P) Gaming Monitor
  • QHD Resolution (2560 x 1440) has 1.7 times the pixel density of Full HD for incredibly detailed pinsharp images
  • HDR10 provides brighter highlights and nuanced shadow for added depth - making every scene feel more vivid and realistic
  • The 180Hz refresh rate minimizes lag for gameplay with ultra-smooth action. Plus, the 1ms response time helps capture your moves in real-time, allowing you to react fast for gaming precision
  • AMD FreeSync reduces choppiness, screen lag and image tearing, ensuring that your fast-paced, complex in-game action is stable with minimal stutter
  • Ergonomic stand allows for tilt, pivot and height adjustments to maximize gaming comfort

Navigation times out or the page is blank

Check the URL from the capture environment, authentication and required headers, DNS access, and the page’s own JavaScript errors. Increase the navigation timeout only after identifying whether the problem is a slow dependency or a failed load. A longer timeout cannot repair a blocked request or invalid URL.

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

Reliability and performance practices

Make visual state reproducible

  • Record the URL, viewport, device scale factor, browser version, output format, and capture area with each artifact.
  • Use a deterministic wait condition, such as a ready selector, rather than relying only on elapsed time.
  • Disable or control animations when comparing images so motion does not change the captured frame.
  • Use the same fonts and authentication state across runs.

Control memory and transfer size

Pixel count grows with both dimensions. A 2× device scale factor can produce roughly four times as many pixels as a 1× capture for the same CSS area. Full-page images add height on top of that. Prefer element or clip captures for targeted review, stream or process buffers promptly, and avoid retaining many large images in memory at once.

Use retries carefully

Retry transient navigation or resource failures, but do not hide deterministic selector errors with repeated attempts. Log the failure stage—navigation, readiness wait, locator resolution, or screenshot encoding—so the corrective action is clear.

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

When to use CSS scale instead

scale: "css" is appropriate when downstream systems expect CSS-pixel dimensions, storage is constrained, or you are comparing layout geometry rather than inspecting fine device-pixel detail. It does not make the page lower quality in a visual sense; it produces fewer output pixels. Choose one policy for a test suite and apply it consistently.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. A single request returns a PNG, JPEG, WebP, or PDF, while its capture flow accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status with X-Page-Verdict and X-Billed headers.

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

For the API parameters and all 63 capture options, see the ScreenshotNeo documentation. This call captures Stripe as a WebP file:

Best Value
Sale
Dell 27 Monitor S2725QC, 4K UHD IPS, 120Hz, 99% sRGB, 4ms, FreeSync Premium
  • Low blue light: The improved ComfortView Plus reduces harmful blue light emissions to ≤35%, for all-day comfort without sacrificing color accuracy.
  • Refresh rate: A smooth, tear-free experience with AMD FreeSync Premium (refresh rate up to 120Hz) and an ultra-low 0.03ms response time create a captivating experience for work and play.
  • Vivid colors: Immerse yourself in breathtaking 4K visuals with in-plane switching technology. Enjoy vibrant colors with 99% sRGB. The 1500:1 contrast ratio and HDR readiness deliver excellent depth and detail.
  • Re-engineered sound quality: Enjoy more detailed sound with spacious audio featuring greater output power, deeper frequency response and more decibel range than the previous generation.
  • Easy connectivity: Keep your desk organized and clutter-free with a single USB-C cable (up to 65W power delivery).
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The same request in Python:

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

And in Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo also supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets and custom viewports, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, pre-capture clicks, hide selectors, waits for selectors, delays or network idle, blocking ads or resource types, custom headers, cookies, user agents and authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing provides two months free, and every feature is included on every plan. Create a free ScreenshotNeo account.

Frequently asked questions

Frequently Asked Questions

Does a higher device scale factor change responsive breakpoints?

No. Responsive layout is governed by the CSS viewport. Device scale factor changes the emulated device-pixel density; changing viewport dimensions can change breakpoints.

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

Can I combine fullPage and locator screenshots?

Use the option that matches the artifact you need: fullPage captures the document, while locator.screenshot() captures one element. You can run separate captures in the same page when both are required.

Which format is best for pixel-diff tests?

PNG is usually the safest choice because it is lossless. Keep the scale, viewport, browser, fonts, and ready condition identical between runs.

Why specify scale when Playwright documents a default?

Explicit configuration prevents surprises when code moves between regular page screenshots and screenshot assertions, whose documented defaults differ.

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.