Skip to main content

Image Formats

DomShot supports three image formats. Choose based on your use case: lossless quality (PNG), smaller file size (JPEG/WebP), or modern web optimization (WebP).

Format comparison

FormatCompressionQuality ParameterTransparencyBest For
PNGLosslessNoYesText, UI, documentation
JPEGLossyYes (1-100)NoPhotographs, complex images
WebPLossyYes (1-100)YesWeb applications, storage

PNG

Lossless compression with perfect quality. Best for screenshots containing text, UI elements, or when you need transparency.
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&format=png" \
  --output screenshot.png
Characteristics:
  • Largest file size
  • No quality loss
  • Supports transparency
  • Universal compatibility

JPEG

Lossy compression optimized for photographic content. Smaller files with adjustable quality.
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&format=jpeg&quality=80" \
  --output screenshot.jpg
Characteristics:
  • Smaller file size than PNG
  • Adjustable quality (1-100, default: 100)
  • No transparency support
  • Best for photos and complex graphics

WebP

Modern format with excellent compression ratio. Ideal for web applications and storage optimization.
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&format=webp&quality=80" \
  --output screenshot.webp
Characteristics:
  • Best compression ratio
  • Adjustable quality (1-100, default: 100)
  • Supports transparency
  • Modern browser support

Quality parameter

The quality parameter controls compression for JPEG and WebP formats:
ValueDescription
1-49Low quality, smallest files
50-79Good balance of quality and size
80-100High quality, larger files (default: 100)
Quality settings do not apply to PNG format since it uses lossless compression.

Recommendations

Choose your format based on your primary need:
Use caseFormatReason
Documentation, tutorialsPNGSharp text, universal support
Social media thumbnailsJPEGSmall file size, wide compatibility
Web applicationsWebPBest compression, modern standard
ArchivingPNGLossless quality for long-term storage
Email attachmentsJPEGSmaller files, faster loading

Parameters

ParameterTypeDefaultDescription
formatstringpngpng, jpeg, or webp
qualitynumber100Image quality from 1-100 (JPEG/WebP only)

See also