Compress image
image_compressCompress an image file, optionally resize it, and convert formats to reduce file size or meet dimension limits.
Instructions
Compress an image file and optionally resize it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>"
},
"name": "image_compress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | Resize fit mode. Default: inside. | |
| width | No | Optional max width in pixels. | |
| format | No | Output image format. Defaults to source format. | |
| height | No | Optional max height in pixels. | |
| quality | No | Compression quality (1-100). Default: 80. | |
| input_path | Yes | Source image path. | |
| output_path | No | Output image path. |