Resize

Resize the output image after capture, or produce a transparent background. Useful for generating thumbnails.

The browser captures at the viewport resolution. image_width and image_height resize the output after capture, useful for generating thumbnails without changing the viewport.

omit_background makes the page background transparent (PNG only). Useful for component screenshots that need to be composited elsewhere.

Parameters

NameTypeRequiredDescription
image_widthintegeroptionalResize output to this width in pixels (1–5000). Aspect ratio preserved unless image_height is also set.
image_heightintegeroptionalResize output to this height in pixels (1–5000).
omit_backgroundbooleanoptionalTransparent page background (PNG only). Default: false.

Code Examples

# 400px-wide thumbnail
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&image_width=400" -o thumb.png

# Transparent background
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&omit_background=true" -o transparent.png

Response

(Raw PNG bytes resized to 400 px wide, Content-Type: image/png)