LinuxCommandLibrary

pageres

captures screenshots of websites at specified viewport sizes

TLDR

Screenshot a website

$ pageres [https://example.com]
copy
Specify viewport size
$ pageres [https://example.com] [1024x768]
copy
Multiple sizes
$ pageres [https://example.com] [1024x768] [1920x1080]
copy
Capture full page
$ pageres [https://example.com] --crop=false
copy
Set output filename
$ pageres [https://example.com] --filename=[screenshot]
copy
Delay before capture
$ pageres [https://example.com] --delay=[3]
copy
Set output directory
$ pageres [https://example.com] -d [./screenshots]
copy

SYNOPSIS

pageres [options] url [sizes...]

DESCRIPTION

pageres captures screenshots of websites at specified viewport sizes. It's useful for responsive design testing.
Multiple viewport sizes can be specified in a single command. Each size produces a separate image.
Full-page screenshots capture content below the fold. Cropping limits output to visible viewport.
Delays allow JavaScript and animations to complete. Custom CSS can hide or modify elements.
Output supports PNG and JPEG formats. Filenames can include URL and size variables.

PARAMETERS

-d, --dest DIR

Output directory.
--filename TEMPLATE
Filename template.
--delay SECONDS
Delay before screenshot.
--crop
Crop to viewport size.
--overwrite
Overwrite existing files.
--format FORMAT
Image format (png/jpg).
--scale FACTOR
Scale factor.
--css CSS
Custom CSS.
--cookie COOKIE
Cookie string.
--header HEADER
HTTP header.
--user-agent UA
User agent string.

CAVEATS

Requires headless Chrome/Chromium. JavaScript-heavy sites may need delays. Some sites block automated screenshots.

HISTORY

pageres was created by Sindre Sorhus for responsive design testing. It provides a command-line interface for website screenshot automation.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community