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
| Field | Type | Default | Notes |
|---|---|---|---|
fullPage | boolean | true | Capture the entire scrollable page. Set to false for viewport-only shots. |
quality | number (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 Range | Use Case |
|---|---|
85-100 | High fidelity archives, design review |
70-84 | General purpose, good balance of size and quality |
50-69 | Thumbnails, 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:
| Field | Type | Default | Notes |
|---|---|---|---|
width | number | — | Required. Viewport width in pixels. |
height | number | — | Required. Viewport height in pixels. |
deviceScaleFactor | number | 1 | Pixel density (e.g., 2 for Retina displays). |
isMobile | boolean | false | Emulate mobile device meta viewport. |
isLandscape | boolean | false | Landscape orientation for mobile emulation. |
hasTouch | boolean | false | Enable touch event support. |
Common Viewport Presets
| Device | Width | Height | Scale Factor | Mobile |
|---|---|---|---|---|
| Desktop HD | 1920 | 1080 | 1 | false |
| MacBook Pro 14" | 1496 | 812 | 2 | false |
| iPad Pro | 1024 | 1366 | 2 | true |
| iPhone 14 Pro | 393 | 852 | 3 | true |