Docs
Image Options

Image Options

Configure screenshot output settings for PNG, JPEG, and WebP formats.

Options for image formats (png, jpeg, webp). These settings are passed in options.imageOptions.

Options

FieldTypeDefaultNotes
fullPagebooleantrueCapture the entire scrollable page. Set to false for viewport-only shots.
qualitynumber (1-100)Compression quality for jpeg/webp formats. Ignored for png.

Full Page vs Viewport

By default, screenshots capture the entire page including content below the fold. This is useful for:

  • Landing page archives
  • Design review and sign-off
  • Regression testing of long-form content

Set fullPage: false when you only need what's visible in the viewport:

  • Above-the-fold performance testing
  • Specific section captures
  • Faster processing for large pages

Quality Settings

For jpeg and webp formats, the quality parameter controls the compression level:

Quality RangeUse Case
85-100High fidelity archives, design review
70-84General purpose, good balance of size and quality
50-69Thumbnails, previews, bandwidth-constrained scenarios

The quality parameter is ignored for png format since PNG uses lossless compression.

Example Request

curl -s -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://site.com/"
    ],
    "viewports": [
      {
        "width": 1496,
        "height": 812,
        "deviceScaleFactor": 2
      }
    ],
    "options": {
      "format": "jpeg",
      "imageOptions": {
        "fullPage": true,
        "quality": 85
      }
    }
  }' \
  "https://api.watchero.io/api/v1/snapshots"

Viewport Configuration

The viewports array defines the browser dimensions for capture. Each viewport can include:

FieldTypeDefaultNotes
widthnumberRequired. Viewport width in pixels.
heightnumberRequired. Viewport height in pixels.
deviceScaleFactornumber1Pixel density (e.g., 2 for Retina displays).
isMobilebooleanfalseEmulate mobile device meta viewport.
isLandscapebooleanfalseLandscape orientation for mobile emulation.
hasTouchbooleanfalseEnable touch event support.

Common Viewport Presets

DeviceWidthHeightScale FactorMobile
Desktop HD192010801false
MacBook Pro 14"14968122false
iPad Pro102413662true
iPhone 14 Pro3938523true

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking Accept, you agree to our use of cookies.
Learn more.