photo_resize
Resize Image — Resize an image by pixel dimensions, percentage, fit-within-max, or exact canvas. Supports maintaining aspect ratio. [category: photo]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | JPG, PNG, WebP, GIF, BMP, TIFF, AVIF, HEIC or HEIF. Output keeps the input format, except that a HEIC or HEIF photo comes back as a JPG. | |
| mode | No | 'max' fits within width×width and never upscales; 'canvas' resizes then pads to exact WxH with bg_color; 'percentage' scales by %. | dimensions |
| width | No | Target width in pixels. In 'Fit inside a box' mode this is the longest side the picture may reach. | |
| height | No | Target height px. | |
| bg_color | No | Colour of the padding added around the picture when it does not fill the canvas. | white |
| percentage | No | Scale to this percent of the original size. | |
| strip_meta | No | Strip EXIF metadata from the output. | |
| force_exact | No | Force exact dimensions, ignoring aspect ratio. | |
| maintain_ratio | No | Keep aspect ratio (dimensions mode). Field name is 'maintain_ratio' — not 'maintain_aspect'. |