Compress a local image
abox_image_compressCompresses local JPEG, PNG, or WebP images to a target byte size, optionally resizing or changing format, and saves a new file. Check fitted status since a target may be missed.
Instructions
Compress a still JPEG, PNG, or WebP to a target byte count using the existing abox.tools search and local browser codecs. Writes a new local file. Check fitted; a target can be missed. Already-small files pass through with metadata. Auto can adjust the output extension.
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>",
"output_path": "<output_path>",
"target_bytes": "<target_bytes>"
},
"name": "abox_image_compress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | keep | |
| input_path | Yes | Absolute local filesystem path. URLs and network shares are refused. | |
| output_path | Yes | Absolute local filesystem path. URLs and network shares are refused. | |
| allow_resize | No | ||
| target_bytes | Yes |