Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Cupertino desk4 min

Capture Website Screenshots at iPhone Viewport Sizes with Puppeteer

Apply a Puppeteer iPhone profile before navigation, wait for the content you need, and capture the viewport with page.screenshot().

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.

Use Puppeteer’s built-in iPhone device profile, apply it before loading the page, then save the viewport with page.screenshot(). This emulates a browser configuration; it does not prove how the site renders in iOS Safari on a physical iPhone.

Capture a website at an iPhone viewport

The example uses Puppeteer’s documented iPhone 17 Pro profile. Install Puppeteer in a Node.js project, save the code as screenshot.mjs, and run it with node screenshot.mjs.

As an Amazon Associate I earn from qualifying purchases.

import puppeteer, {KnownDevices} from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.emulate(KnownDevices['iPhone 17 Pro']);
  await page.goto('https://example.com', {waitUntil: 'networkidle2'});
  await page.screenshot({path: 'screenshot.png'});
} finally {
  await browser.close();
}

Replace https://example.com with the page to capture. The finally block closes the browser even if navigation or capture fails. Puppeteer documents page.emulate() as a shortcut for setting the user agent and viewport; apply it before navigation because some sites do not respond reliably to a size change after loading. See the Puppeteer Page.emulate() API.

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

Choose the iPhone profile or set a custom viewport

Use a named profile

KnownDevices includes named iPhone profiles from the iPhone 15, 16 and 17 families, with portrait and landscape variants. Examples include iPhone 17 Pro, iPhone 17 Pro Max, iPhone 16e and iPhone 15. Select the profile that best matches the browser configuration you want to approximate; it is not a guarantee of pixel-identical output on every physical iPhone. See the KnownDevices reference for available names.

#1 Best Overall
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
  • This phone is unlocked and compatible with any carrier of choice on GSM and CDMA networks (e.g. AT&T, T-Mobile, Sprint, Verizon, US Cellular, Cricket, Metro, Tracfone, Mint Mobile, etc.).
  • Please check with your carrier to verify compatibility.
  • The device does not come with headphones or a SIM card. It does include a generic (Mfi certified) charging cable.
  • Tested for battery health and guaranteed to have a minimum battery capacity of 80%.

Use explicit dimensions

For a particular breakpoint or custom size, use page.setViewport() before navigation instead of a named profile. For example:

await page.setViewport({width: 390, height: 844, deviceScaleFactor: 1});
await page.goto('https://example.com');

Those dimensions are an example of a custom viewport, not a claim about a specific iPhone model. Consult the Page.setViewport() API for supported settings. Changing isMobile or hasTouch may trigger a page reload in some cases, so configure the viewport before loading the target.

Wait for the right page state, then capture

The example waits for networkidle2, as in Puppeteer’s screenshot guide. That is a useful starting point, not a universal signal that a page is visually ready: long polling, animations, deferred content or application-specific loading can require a different wait.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Apple iPhone 16, 128GB, Pink - Unlocked (Renewed)
  • 6.1" Super Retina XDR OLED, HDR10, Dolby Vision, 1000nits (typ), 2000nits (HBM), 2556x1179px at 460ppi, 3561mAh Battery
  • 128GB 8GB RAM, Apple A18 (3nm), Hexa-core (2x4.04 GHz + 4x2.20 GHz), Apple GPU 5-core, 16‑core Neural Engine
  • Rear camera: 48MP, f/1.6, wide + 12MP, f/2.2, ultrawide, Front Camera: 12MP, f/1.9, wide, iOS 18, upgradable to iOS 18.5
  • 4G LTE: 1/2/3/4/5/7/8/12/13/14/17/18/19/20/25/26/28/29/30/32/34/38/39/40/41/42/48/53/66/71, 5G: n1/2/3/5/7/8/12/14/20/25/26/28/29/30/38/40/41/48/53/66/70/71/75/76/77/78/79 - Dual eSIM
  • Unlocked for freedom to choose your carrier. Compatible with both GSM & CDMA networks. The phone is unlocked to work with all GSM Carriers & CDMA Carriers Including AT&T, T-Mobile, Verizon, Sprint., Etc.

When the screenshot depends on a specific element or app state, wait for that selector or state explicitly before taking the image. For instance:

await page.goto('https://example.com', {waitUntil: 'domcontentloaded'});
await page.waitForSelector('.product-gallery img');
await page.screenshot({path: 'product-page.png'});

Use a selector that represents the content you actually need; a visible element may still have images or data loading asynchronously. page.screenshot() captures the current viewport by default, not automatically the whole page. Puppeteer’s screenshots guide covers screenshot options, including saving with path. To capture a particular element, use ElementHandle.screenshot(); Puppeteer can scroll a hidden element into view before capturing it. The Page.screenshot() API documents the page capture options.

What this emulation does—and does not—test

Puppeteer applies the selected profile’s device metrics and user agent in its browser. This is useful for checking responsive layout and taking repeatable screenshots at an iPhone-like viewport. It is not equivalent to running the site in iOS Safari on physical hardware, so use actual-device coverage when browser-specific behavior is important.

Rank #3
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
  • 6.1inch Super Retina XDR display. Aluminum with color-infused glass back. Ring/Silent switch
  • Dynamic Island. A magical way to interact with iPhone. A16 Bionic chip with 5-core GPU
  • Advanced dual-camera system. 48MP Main | Ultra Wide. Super-high-resolution photos (24MP and 48MP). Next-generation portraits with Focus and Depth Control. 4X optical zoom range
  • Emergency SOS via satellite. Crash Detection. Roadside Assistance via satellite
  • Up to 26 hours video playback. USB C, Supports USB 2. Face ID

For broader visual testing, BrowserStack Percy documents both responsive screenshots at configured widths and mobile-browser snapshots on real mobile devices. Its documentation says responsive widths count as separate screenshots against monthly usage, while mobile-browser access requires the Desktop & Mobile plan or a trial request. These are service terms that can change; check the current Percy mobile visual testing documentation and responsive testing documentation before relying on specific access or usage terms.

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

Troubleshoot common capture problems

The site shows a desktop layout

Check that the profile is applied with page.emulate() before page.goto(). If using custom dimensions, set them before navigation and confirm that the intended mobile metrics and user agent are part of the setup.

The screenshot is blank or missing content

Navigation completing does not guarantee that the application has rendered its final content. Wait for a page-specific selector or application signal, and check whether the target content loads only after scrolling or another interaction.

Rank #4
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed) | Unlocked
  • This pre-owned product is not Apple certified, but has been professionally inspected, tested and cleaned by Amazon-qualified suppliers.
  • There will be no visible cosmetic imperfections when held at an arm’s length.
  • This product is eligible for a replacement or refund within 90 days of receipt if you are not satisfied.
  • Product may come in generic Box.

The screenshot is cut off

page.screenshot() produces a viewport capture unless configured otherwise. If you need the full document, consult the screenshot guide’s full-page option; if you need one component, capture its element rather than the page viewport.

The command fails before capture

Confirm that Puppeteer is installed in the project, the script uses module syntax supported by its filename or project configuration, and the device name matches an entry in the installed Puppeteer version’s KnownDevices. Device profiles can vary with Puppeteer versions; the API pages consulted for this guide showed Puppeteer 25.11.0 for Page.emulate() and 25.12.0 for the screenshot, viewport and KnownDevices references on October 3, 2026.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 takes a screenshot through one GET request and also offers an MCP server for AI agents. Its cleanup accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the page verdict and billing status in headers. This is a hosted screenshot rather than a local Puppeteer browser session.

For API parameters, see the ScreenshotNeo documentation.

Best Value
Apple iPhone 16e, 128GB, Black - Unlocked (Renewed)
  • 6.1" Super Retina XDR OLED, HDR10, 800 nits (HBM), 1200 nits (peak), 2532x1170px at 460ppi, 4005mAh Battery
  • 8GB RAM, Apple A18 6-core CPU (2 performance + 4 efficiency cores), Apple GPU 4-core, 16‑core Neural Engine
  • Rear camera: 48MP, f/1.6, wide, Front Camera: 12MP, f/1.9, wide, iOS 18.3.1, upgradable to iOS 18.5
  • Connectivity: Global 4G LTE, Sub-6 GHz 5G, LTE, Wi-Fi 6, Bluetooth 5.3, NFC, USB-C, Wireless Charging (7.5W). (does not have mmWave 5G or MagSafe or physical SIM card) - Dual eSIM Only
  • Unlocked for freedom to choose your carrier. Compatible with both GSM & CDMA networks. The phone is unlocked to work with all GSM Carriers & CDMA Carriers Including AT&T, T-Mobile, Verizon, Straight Talk., Etc.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.

Learn more about ScreenshotNeo.

Frequently Asked Questions

Does Puppeteer’s screenshot use the whole iPhone screen?

It captures the browser viewport, not the physical phone’s full screen or hardware interface.

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

Can I use the same approach for landscape?

Yes. Select a landscape variant from Puppeteer’s named device profiles, or configure custom viewport dimensions before navigation.

Quick Recap

Bestseller No. 1
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
Please check with your carrier to verify compatibility.; Tested for battery health and guaranteed to have a minimum battery capacity of 80%.
$300.00
Bestseller No. 3
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
Dynamic Island. A magical way to interact with iPhone. A16 Bionic chip with 5-core GPU; Emergency SOS via satellite. Crash Detection. Roadside Assistance via satellite
$405.00
Bestseller No. 4
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed) | Unlocked
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed) | Unlocked
There will be no visible cosmetic imperfections when held at an arm’s length.; Product may come in generic Box.
$262.00

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 *

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.