photo_compress_to_size
Compress Image to Size — Compress an image to hit a target file size in KB. [category: photo]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | JPG, PNG, WebP, GIF, BMP, HEIC, HEIF | |
| strip_exif | No | Strip EXIF metadata from the output. | |
| output_format | No | What to save it as. Leave blank to keep the format it came in as - except HEIC and HEIF pictures, which always come back as JPG. Squeezing to a size needs a format that compresses, which is why BMP and GIF are not offered. | |
| target_size_kb | Yes | Target size in KB as a positive integer, e.g. 200. Field name is 'target_size_kb' — not 'target_size'. |