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 | |
| 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 px. In the default 'dimensions' mode at least one of width/height is REQUIRED; also required for width/max/canvas modes. | |
| height | No | Target height px. | |
| bg_color | No | Canvas background color (mode=canvas). | white |
| percentage | No | Scale percentage — REQUIRED when mode=percentage. | |
| 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'. |