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.
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 |