optimize_image
Resize, convert, and enhance images from file paths or URLs with options for rotation, cropping, blur, and quality adjustment.
Instructions
Optimize an image from a file path or URL with various transformation options
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | How to fit the image when resizing | |
| blur | No | Blur sigma value (0.3 to 1000) | |
| flip | No | Flip the image vertically | |
| flop | No | Flop the image horizontally | |
| input | Yes | Input image path or URL | |
| width | No | Target width in pixels | |
| format | No | Output format | |
| height | No | Target height in pixels | |
| output | Yes | Output file path | |
| rotate | No | Rotation angle in degrees | |
| quality | No | Quality (1-100) for lossy formats | |
| sharpen | No | Apply sharpening | |
| position | No | Position when fit is cover or contain (e.g., "center", "top", "right bottom") | |
| grayscale | No | Convert to grayscale | |
| normalize | No | Normalize image contrast | |
| background | No | Background color when using contain (e.g., "#ffffff", "transparent") |