Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

How to Ask an AI Agent to Screenshot a Webpage at a Specific Viewport Size

A precise screenshot prompt names the URL, CSS-pixel viewport, readiness condition, capture scope, output format and destination—and separates viewport size from device emulation and image scale.

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.

Give the agent the exact URL, viewport width and height in CSS pixels, when to capture, what portion of the page to capture, and where to save the image. Set the viewport before navigation if the page may respond to its size. Specify device emulation and screenshot pixel scale separately: viewport dimensions alone do not reproduce a phone, and they do not necessarily determine the image’s output dimensions.

Use a prompt with measurable settings

For a browser-automation agent using Playwright, start with a request like this:

As an Amazon Associate I earn from qualifying purchases.

Using Playwright, open https://example.com with a 1280 × 800 CSS-pixel viewport set before navigation. Wait until the main content is visible. Capture only the current viewport as a PNG, save it as /tmp/page.png, then report the viewport dimensions and file path.

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

This is a prompt template, not a claim that the example URL has been tested. Replace the URL, readiness condition, dimensions, scope, format and path with your requirements. If your agent cannot use Playwright or save files locally, ask which browser tool and output method it supports before relying on those parts of the request.

#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

Specify what “size” means

Viewport dimensions are CSS pixels

A browser viewport is the area in which a page is laid out. State both width and height, and say “CSS pixels” when you mean layout dimensions. Playwright’s page.setViewportSize({ width, height }) accepts those dimensions; its documentation example sets them before navigating. Playwright also notes that changing the viewport resets screen, and recommends context-level screen and viewport settings when more control is needed. See the Playwright Page API.

Setting the viewport before navigation matters because a page can choose a responsive layout during load. As Playwright puts it: “A lot of websites don’t expect phones to change size, so you should set the viewport size before navigating to the page.”

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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

Output pixels are a separate choice

If exact image-file dimensions matter, specify screenshot scale as well as viewport dimensions. Playwright MCP documents scale: "css" for CSS-pixel sizing (the default) and scale: "device" for output scaled by device pixel ratio. A 1280 × 800 CSS-pixel viewport and a device-scaled image therefore describe different settings. See Playwright MCP screenshot options.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Viewport size is not complete device emulation

If you need a phone-like rendering, state the target device or the relevant emulation settings, such as user agent, screen size, viewport and touch capability. A width and height by themselves do not establish all those properties. Playwright’s emulation and Page API documentation describes device emulation as more than viewport dimensions.

Rank #3
Sale
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.

Choose the capture scope

  • Viewport: only what is currently visible inside the browser viewport.
  • Full page: the entire scrollable page, rather than just the visible area. Playwright’s fullPage option captures the page as if it were displayed on a very tall screen. See the Playwright screenshots guide.
  • Element: a specific region, identified by a selector or otherwise selected by the tool.

Do not say “full-page” if the goal is a fixed-size viewport image: full-page capture can be much taller than the viewport. Playwright MCP supports viewport, element and full-page captures; Chrome DevTools Protocol documents screenshot clipping and capture beyond the viewport. See Playwright MCP and the Chrome DevTools Protocol Page domain.

Checklist for a reliable request

  1. URL: Provide the exact page, including the relevant path or query string.
  2. Viewport: Give width and height, with CSS pixels if those are the intended layout units. Say that they must be applied before navigation when responsive behavior matters.
  3. Readiness: Name a visible or site-specific condition, such as the main heading appearing. A condition tied to the page is more useful than an unexplained fixed delay.
  4. Emulation: State device behavior separately if needed: target device, user agent, touch, screen and viewport configuration.
  5. Scope: Choose viewport, full page or a particular element.
  6. Scale and format: Specify output scale if image pixel dimensions matter, plus PNG, JPEG or WebP if the format matters. Chrome DevTools Protocol documents those image formats in its Page domain.
  7. Destination: Give a filename or path that the agent’s environment can write to.
  8. Verification: Ask the agent to report the applied viewport, scope, scale and saved path. This helps check configuration; it does not prove that the page rendered correctly.

Adapt the prompt to the capture you need

Visible viewport

Open [URL] with a [width] × [height] CSS-pixel viewport set before navigation. Wait until [visible page-ready condition]. Save a PNG of the visible viewport to [path]. Report the applied viewport dimensions and saved path.

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

Entire scrollable page

Open [URL] at [width] × [height] CSS pixels. Wait until [condition]. Capture the full scrollable page as [format] and save it to [path]. Report that full-page mode was used.

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

Mobile-style capture

Open [URL] using [device or explicit emulation settings], with a [width] × [height] CSS-pixel viewport. Set viewport and screen values as specified before navigation. Capture [viewport or full page] as [format] and save it to [path]. Report the emulation settings used.

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.

Call this a device emulation only if the agent actually configures the relevant device properties; a viewport-only capture is not an exact device reproduction.

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

Troubleshoot unexpected results

  • The page has the wrong responsive layout: Ask the agent to apply the viewport before navigation. If screen properties also matter, specify them through the browser context rather than relying on viewport size alone.
  • The saved image dimensions differ from the requested viewport: Clarify whether the requested dimensions refer to CSS pixels or output image pixels, and specify CSS or device screenshot scale.
  • The image includes only the top of a long page: The request likely captured the viewport. Ask for full-page mode if you need the entire scrollable page.
  • The page is captured before content appears: Replace a generic delay with a page-specific readiness condition, such as the main content becoming visible.
  • The file is missing: Confirm that the agent’s runtime can write to the requested path and ask it to report the actual output location. A path on the agent’s machine may not be accessible from your own device.
  • The result does not behave like the named phone: Request the needed user agent, screen, viewport and touch settings explicitly. Dimensions alone do not configure full device behavior.

Or skip the browser setup

If you would rather make an API request than configure browser automation, ScreenshotNeo accepts a URL and can return a screenshot as PNG, JPEG or WebP, or a PDF. Its viewport options let you specify dimensions. See the ScreenshotNeo API documentation for request options and response details.

For example, this cURL request captures a page to a WebP file:

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

Replace the example URL with the page you want and provide your API key. The endpoint also supports other screenshot settings; consult the documentation for the exact parameter names. ScreenshotNeo removes cookie banners, newsletter popups and chat widgets before capture, and lets you turn those steps off. Bot checks, blank pages, failed loads, timeouts and cache hits are not billed; response headers identify the page verdict and billing status. An MCP server provides take_screenshot, get_page_info and capture_pdf tools for AI agents. 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.

Frequently Asked Questions

Does specifying 1280 × 800 guarantee a 1280 × 800 image file?

No. Those values describe the CSS-pixel viewport unless you also specify screenshot output scale. Device-scale output can have different pixel dimensions.

Does setting a phone-sized viewport emulate a phone?

No. Specify the device settings you need, such as user agent, screen configuration and touch capability, in addition to viewport dimensions.

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.

Leave a Reply

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

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
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.