Skip to content

Quickstart

Start with a dry-run. This shows the planned output path without writing:

Terminal window
rastry photo.png --to webp --quality 82 --dry-run

When the plan looks right, opt into writing explicitly:

Terminal window
rastry photo.png --to webp --quality 82 --execute

Without –output, Rastry writes beside the input using a derived name such as photo-rastry.webp. It does not replace photo.png.

The web preset resizes to a maximum width of 1600 pixels, converts to WebP at quality 82, and removes metadata:

Terminal window
rastry run ./public --preset web --dry-run

Then execute the reviewed plan into a separate directory:

Terminal window
rastry run ./public --preset web --output ./optimized --execute

See the web preset, batch guide, and output safety rules.

Add –json to a dry-run or execution for automation:

Terminal window
rastry run ./public --preset web --dry-run --json