Skip to main content
Viewport dimensions are CSS pixels. The device scale factor controls output pixel density. A 1280 × 720 viewport at scale 2 produces a 2560 × 1440 viewport image.

Limits and defaults

The nested viewport keys use camelCase, while most top-level capture options use snake_case.

Device presets

Set device to a supported preset identifier, such as iphone_15_pro. Presets include viewport dimensions, pixel density, mobile/touch settings, and, for mobile devices, a user agent.
The generated device reference lists the identifiers and dimensions supported by this implementation. A device preset takes precedence when both device and viewport are supplied. Use either a device preset or an explicit viewport for predictable configuration. Device emulation changes browser context settings. It does not run the target inside the physical device or its native browser. For an element capture, output dimensions describe the selected element rather than the whole viewport. Choose a lower scale factor when smaller output is more useful than higher pixel density. For long pages, combine viewport sizing with full-page diagnostics.