Screenshotly supports multiple output formats. Choose the one that best fits your use case.
| Format | Best for | Transparency | Compression |
|---|
| PNG | UI screenshots, pixel-perfect captures | Yes | Lossless |
| JPEG | Photos, large pages, smaller file sizes | No | Lossy |
| WebP | Web delivery, best size-to-quality ratio | Yes | Both |
const screenshot = await client.capture({
url: 'https://example.com',
format: 'webp'
});
The default format is png.
Quality settings
For JPEG and WebP formats, use the quality parameter to control compression. The value is an integer between 0 and 100:
const screenshot = await client.capture({
url: 'https://example.com',
format: 'jpeg',
quality: 80
});
| Quality range | File size | Visual quality |
|---|
| 90-100 | Large | Highest fidelity |
| 70-89 | Medium | Good for most uses |
| 50-69 | Small | Noticeable artifacts |
| Below 50 | Smallest | Significant quality loss |
The quality parameter has no effect on PNG format since PNG uses lossless compression.
PDF output
Screenshotly also supports PDF output with additional options:
{
"url": "https://example.com",
"format": "pdf",
"pdfOptions": {
"format": "A4",
"printBackground": true,
"landscape": false,
"margin": {
"top": "1in",
"bottom": "1in"
}
}
}
PDF-specific parameters
| Parameter | Type | Description |
|---|
pdfOptions.format | string | Paper size: A4, Letter, Legal, etc. |
pdfOptions.printBackground | boolean | Include background colors and images |
pdfOptions.landscape | boolean | Use landscape orientation |
pdfOptions.margin | object | Page margins (top, bottom, left, right) |
pdfOptions.scale | number | Scale of the webpage rendering (0.1 to 2) |
pdfOptions.pageRanges | string | Page ranges to print, e.g. “1-3, 5” |
- Use PNG when you need transparency or pixel-perfect accuracy
- Use JPEG at quality 75-85 for the best balance of size and quality
- Use WebP for web delivery where browser support is available
- Use PDF when you need a printable document format
Plan availability
The Free plan supports PNG only. JPEG, WebP, and PDF are available on the Starter plan and above.