--image-transparent-background
- CLI
- --image-transparent-background
Preserves unpainted areas of the page as transparent in the output image. Elements with an explicit CSS background remain opaque.
| Output | Behavior |
|---|---|
png, apng, webp, tiff, jpegxl, astc, ktx | Preserves straight alpha |
| All other formats | Rejected as an invalid argument |
Example
zshot -f tiger.png \
--image-transparent-background \
https://zshot-cli.com/example_assets/tiger/tiger.svg{
"url": "https://zshot-cli.com/example_assets/tiger/tiger.svg",
"output_type": "png",
"image_transparent_background": true
}curl -X POST http://127.0.0.1:3000/ \
-H "Content-Type: application/json" \
-d '{"url":"https://zshot-cli.com/example_assets/tiger/tiger.svg","output_type":"png","image_transparent_background":true}' \
-o tiger.png