--image-selector
- CLI
- --image-selector
- REST
- image_selector
Crops the image to the element matching this CSS selector. The element’s size will determine the output size, which --image-width and --image-height override. An invalid or selector that matches nothing will cause an error.
Example
zshot -f main.png \
--image-selector "main" \
https://zshot-cli.com/example_assets/gazette/{
"url": "https://zshot-cli.com/example_assets/gazette/",
"output_type": "png",
"image_selector": "main"
}curl -X POST http://127.0.0.1:3000/ \
-H "Content-Type: application/json" \
-d '{"url":"https://zshot-cli.com/example_assets/gazette/","output_type":"png","image_selector":"main"}' \
-o main.png