DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

How to Generate a Retina-Resolution Webpage Screenshot

Set a CSS viewport and deviceScaleFactor in Playwright, then capture with scale: 'device' for a retina-resolution webpage screenshot.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To capture a webpage at retina density with Playwright, set the browser context’s viewport and deviceScaleFactor, then take the screenshot with scale: 'device'. Keep the viewport at the CSS dimensions you want the page to use; the scale factor controls how many image pixels represent each CSS pixel. Add fullPage: true if you need the entire scrollable page rather than just the visible viewport.

Capture a retina-resolution screenshot with Playwright

Install Playwright and its Chromium browser in your project, then run this JavaScript example. It opens a page at a 1440-by-900 CSS-pixel viewport, uses a device scale factor of 2, and saves a full-page PNG.

As an Amazon Associate I earn from qualifying purchases.

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  try {
    const context = await browser.newContext({
      viewport: { width: 1440, height: 900 },
      deviceScaleFactor: 2,
    });
    const page = await context.newPage();
    await page.goto('https://example.com', { waitUntil: 'networkidle' });
    await page.screenshot({
      path: 'retina.png',
      scale: 'device',
      fullPage: true,
    });
  } finally {
    await browser.close();
  }
})();

For a viewport-only screenshot, omit fullPage: true. The viewport controls the layout and visible area; the device scale factor controls density. At scale factor 2, a 1440-by-900 CSS-pixel viewport generally produces an image 2880 pixels wide and 1800 pixels high when captured at device scale. Full-page capture changes the image height to cover the page’s scrollable content.

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

Install and run

  1. In a new project, install Playwright with npm install playwright.
  2. Install its Chromium browser with npx playwright install chromium.
  3. Save the example as retina.js and run node retina.js.
  4. Open retina.png and check its pixel dimensions against the CSS viewport and scale factor you chose.

Understand CSS pixels, device pixels, and screenshot scale

CSS pixels determine how the page lays out. Image pixels are the pixels in the saved file. A high-density capture can store multiple image pixels for each CSS pixel without changing the CSS layout.

#1 Best Overall
Sale
AOC 4K Webcam for PC, Streaming Computer Camera with Noise-Canceling Mic
  • 4K Ultra HD Video​ Webcam:See every detail with crystal-clear 4K resolution. Experience incredibly sharp and lifelike video quality that makes you look professional on every call, ensuring you're always seen in the best light.
  • Wide 80° Field of View & Full 360° Flexibility​:Fit everyone into the frame with the 80° wide-angle lens. Easily adjust your view with 180° tilt and 360° swivel rotation. Mount it securely on your monitor, desk, or tripod for the perfect angle every time.
  • True Plug-and-Play Simplicity: No drivers, no fuss. Just connect the webcam to your computer via USB and you're ready to join calls in seconds. It offers seamless compatibility with all major platforms like Zoom, Teams, and Skype.
  • Complete Privacy with a Physical Sliding Lens Cover: Worried about privacy? We've got you covered—literally. A built-in sliding lens cover physically blocks the camera when not in use, ensuring your private life stays private.
  • Built-in Mic & Automatic Light Correction: Communicate clearly with the built-in noise-reducing microphone. The camera also intelligently adjusts the video brightness to make you look your best, even in poor lighting conditions.
  • scale: 'device' produces one screenshot pixel per device pixel. Set deviceScaleFactor on the browser context to control the density; explicitly selecting device scale makes the intended output clear.
  • scale: 'css' produces one screenshot pixel per CSS pixel. Use it when the output should match CSS-pixel dimensions rather than device-pixel density.
  • Do not enlarge the saved bitmap afterward as a substitute for capturing at device scale. Upscaling adds pixels but does not capture the browser’s higher-density rendering.

Keep the intended CSS viewport constant when you want the same layout at a higher resolution. Changing the viewport width can cross a responsive breakpoint and change the page layout; changing device scale factor while holding the viewport steady raises output density instead.

Choose viewport, full-page, or element capture

  • Viewport: Captures what is visible in the current viewport. It is usually the right choice for a fixed-size preview or a visual comparison of a particular screen state.
  • Full page: Set fullPage: true to capture the page’s full scrollable height. The output may be much taller and larger than a viewport image.
  • One element: Use a locator’s screenshot method when you need an individual component rather than the page. For example: await page.locator('main').screenshot({ path: 'main.png', scale: 'device' });

For pages that load content while scrolling, a full-page capture can require additional preparation so lazy-loaded images or other content have appeared before the screenshot. Wait for the relevant content or scroll through the page before capturing; a screenshot cannot include content the page has not loaded.

Rank #2
Sale
EMEET C960 4K Webcam for PC, PDAF Auto Focus, Dual Omni Mics, 73° FOV
  • Unmatched Clarity with True 4K Resolution - Experience ultra-clear video conferencing with a genuine EMEET SmartCam C960 4K CMOS sensor. No false upscaling, only pure 4K quality. Ideal for remote business meetings where every detail matters. The 4K webcam for laptop provides ultra-clear visuals that make you feel like you're in the same room with your colleagues, students, or audience. Note: Video resolution defaults to 1080P; Switch to 4K via built-in camera software or APPs like PotPlayer/OBS.
  • PDAF Focus & Auto Light Correction - Equipped with PDAF automatic focusing technology, the EMEET webcam for pc 4K ensures clear and stable focusing in various scenarios like business conferences and educational lectures. Say goodbye to blurry interruptions. Online meetings can be conducted in both over-exposed and low-light settings with auto light adjustment. The 73° FOV focus on you rather than your background, no longer need to painstakingly choose or blur your conference background.
  • Dual Omnidirectional Mics - The built-in dual microphones capture voices clearly for crisp, natural audio. Perfect for conference calls and remote teaching, where clear communication is paramount. The webcam with microphone enables you to savor crisp audio quality, fostering an immersive meeting experience that enhances your productivity. Be sure to designate the EMEET SmartCam C960 4K USB webcam as your default microphone device for optimal performance.
  • USB Plug and Play & Privacy Assured - The simplicity of plug-and-play technology meets high performance in the C960 4K webcam. The default USB-A interface ensures that you're up and running in no time no matter your level of tech expertise. The webcam comes with a privacy cover for your security. With the flexible mounting options, you can have a computer camera that adapts to your needs without compromising on your privacy. No Driver/Wi-Fi/Bluetooth/Cloud Storage is used to assure privacy.
  • Compatibility and Versatility - Works effortlessly across multiple platforms such as Windows (Win7,10,11), macOS (10.14 and above), Android TV V7.0 and above, and Linux. Ideal for use with popular communication software from Zoom to Teams to Skype. Personalize your video settings with EMEET's proprietary EMEETLINK software. With adjustable 360° horizontal axis, 15° vertical adjustments, and a 1/4-inch tripod thread, this webcam can be securely mounted on various screen types and tripods.

Other browser-based ways to control density

Chrome DevTools Protocol

The lower-level Chrome DevTools Protocol route is Page.setDeviceMetricsOverride. It lets a client specify width, height, mobile emulation, and deviceScaleFactor. This is useful when working directly with browser protocol commands; with Playwright, the browser context settings are a more direct way to configure the same basic dimensions.

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

Puppeteer

Puppeteer provides a direct Page.screenshot() workflow after navigating to a page. Set the browser’s viewport and device scale factor before capturing, and decide whether the output should represent the viewport or the full page.

Rank #3
Lavsoul 4K Webcam with Microphone for PC & Streaming Computer Camera
  • ULTRA HD 4K CLARITY: Stand out in every video call with breathtaking 4K video at 30fps or smooth 1080p at 60fps. Powered by a premium 1/2.5" CMOS sensor and a wide f/1.78 aperture, this webcam captures every detail with vibrant color and stunning low-light performance-so you always look your best
  • FAST AUTOFOCUS & SMART LIGHT CORRECTION: No more blurry moments with this webcam for PC. Advanced Phase Detection Auto Focus (PDAF) locks onto your face instantly and keeps you sharp-even when you move. Built-in light correction adapts to your environment, balancing brightness and contrast for a flawless image in dim rooms or bright spaces
  • DUAL NOISE-CANCELING MICS: Speak with confidence using this webcam with microphones. Dual microphones with intelligent noise-canceling tech isolate your voice and reduce background noise-suitable for webinars, live streams, team meetings, and virtual interviews
  • WIDE-ANGLE LENS & FLEXIBLE MOUNTING OPTIONS: Capture more of your world with an 80 field of view and full 360 swivel rotation. Whether this streaming webcam is mounted on a laptop, monitor, or tripod, it allows you to find the right angle for any setup
  • BUILT-IN PRIVACY COVER & PLUG-AND-PLAY SIMPLICITY: Protect your privacy with a secure sliding lens cover that blocks the camera when not in use. Setup is a breeze-just plug into any USB-A port and start streaming, chatting, or recording instantly. The USB webcam is compatible with Zoom, Microsoft Teams, Skype, OBS Studio, and all major platforms across Windows, macOS, and Linux

shot-scraper

The shot-scraper documentation describes a --retina shortcut that sets the device scale factor to 2. Check the syntax for your installed version before using a particular flag.

Keep screenshots comparable and usable

  • Match the reference environment: Browser rendering can vary with the host operating system, browser version, browser settings, hardware, power source, and headless mode. For visual regression comparisons, use the same environment that generated the reference screenshot.
  • Account for coordinate scale: Coordinates in a device-pixel screenshot are larger than the corresponding CSS-pixel coordinates. This matters when annotating an image or translating image positions into mouse actions; Playwright’s CLI documentation warns that screenshot coordinates may not align with CSS-pixel mouse coordinates.
  • Expect a larger file: Raising the output dimensions can increase image size and the time required to write or transfer the file. Full-page capture increases height as well as the amount of content captured.
  • Wait for a stable page: Navigation completion does not guarantee that every animation, delayed widget, or lazy-loaded asset has finished. Wait for the specific content needed in the image before capturing.

Troubleshoot common output problems

  • The image is not larger than the CSS viewport: Confirm that the context uses the intended deviceScaleFactor and that the screenshot uses scale: 'device', not scale: 'css'.
  • The layout changed at the higher resolution: Check the viewport width. A changed CSS viewport can trigger a responsive breakpoint; keep it fixed if the goal is the same layout at higher image density.
  • The screenshot cuts off below the fold: Set fullPage: true. For a locator screenshot, confirm the selected element contains the area you intend to capture.
  • Images or content are missing: Wait for the relevant selector or content to appear. If the site loads images on scroll, scroll through the page before taking a full-page capture.
  • Mouse or annotation coordinates do not line up: Convert between CSS pixels and device pixels using the scale factor, and use a consistent coordinate space for the image and browser interaction.
  • A visual comparison differs between runs or machines: Keep the browser version, host environment, rendering mode, viewport, and relevant settings consistent with the reference capture.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API with retina scale support. Its API returns an image or PDF from a GET request; the following cURL example uses the supplied one-call request pattern. See the ScreenshotNeo documentation for request options, including retina scale.

Rank #4
Logitech Brio Ultra 4K HD Webcam for Streaming and Meetings - Black
  • Spectacular video quality: superb resolution, frame rate, color, and detail, featuring autofocus and 5x digital zoom; this Ultra HD webcam supports up to 4K at 30 fps
  • Look great in any light: RightLight 3 automatically adjusts exposure and contrast to compensate for glare and backlighting
  • Adjustable field of view: Choose from three dFOV presets to perfectly frame your video; frame an ideal head and shoulders view with 65° diagonal, and more of the room with 78° or 90° diagonal
  • Sound excellent anywhere: With dual omnidirectional microphones and noise-canceling tech, this webcam with microphone captures clear audio from up to 1.2 meter away while reducing background noise
  • Make it your own: The Logi Options+ app (3) simplifies personal device control with zoom in/out, color presets, color adjustments, set manual focus, and easy firmware updates
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo accepts cookie banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.

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

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Best Value
Logitech MX Brio Ultra HD 4K Webcam Collaboration and Streaming - Graphite
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Ultra HD 4K webcam: meet or stream in 4K resolution at 30fps or 1080p at 60fps, with our most advanced webcam sensor yet, with 70% larger pixels (1) for sharp image quality
  • AI-enhanced image quality: Experience 2x better face visibility with finer image details in difficult light (2), with auto-exposure, auto white balance, noise reduction, and autofocus
  • Curate Your Image: Fine controls (3) on this Ultra HD webcam let you adjust lighting and white balance, such as ISO, Shutter Speed, Tint, and Vibrance, or let Auto mode take care of it
  • Let Them Hear Your Every Word: Integrated dual beamforming noise-reducing microphones minimize background noise with the aid of AI to make sure you are clearly heard

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.

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.