WebP is often a useful delivery format for a PNG asset, but the right choice depends on whether the image needs lossless pixels or transparency. Inspect the result rather than assuming that a smaller file is always better.
Convert one file
rastry logo.png --to webp --quality 82 --dry-runThe shorthand creates a conversion followed by metadata removal. Review the derived output path, then execute:
rastry logo.png --to webp --quality 82 --executeThe PNG remains untouched and the generated file uses a -rastry.webp suffix when no output directory is provided.
Convert a folder
Use the web preset when the folder also needs a dimension limit:
rastry run ./public --preset web --output ./optimized --dry-runFor logos and illustrations, confirm that transparency and fine edges still look correct. Read PNG, WebP, and the safety model before automating the workflow.