Skip to main content

Viewport Presets

Control the viewport size to capture screenshots at different device dimensions. DomShot provides presets for common devices or you can define custom dimensions.

Preset viewports

Mobile

bash

Tablet

bash

Desktop

bash

Custom viewport

bash

Parameters

When using preset viewports (mobile, tablet, desktop), the width, height, and deviceScaleFactor parameters are ignored. These parameters only apply when viewportType=custom.

Device scale factor

The device scale factor controls the pixel density for capturing screenshots on high-DPI displays:
  • 1x - Standard displays (desktop default)
  • 2x - Retina displays (tablet default)
  • 3x - Super Retina displays (mobile default)
Higher scale factors produce larger, sharper images at the cost of file size.

See also