Produce responsive web variants
image_optimize_webConvert a source image into web-ready variants at multiple widths, with optional file-size limits, a blurred placeholder, and a ready-to-use srcset.
Instructions
Turn one source image into a set of web-ready variants at several widths, each optionally constrained to a maximum file size, plus a tiny blurred placeholder and a ready-to-paste srcset. This is the one call to use for 'make this web-ready'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | http(s) URL to fetch. | |
| path | No | Path to the source image. | |
| widths | No | Target widths, e.g. [480, 960, 1440]. Defaults to a sensible ladder. | |
| quality | No | Starting quality for each variant. | |
| base64_data | No | Inline base64 source image. | |
| output_format | No | Output codec: webp, avif or jpeg. | webp |
| strip_metadata | No | Strip metadata from every variant. | |
| create_placeholder | No | Also produce a tiny blurred placeholder and its base64 data URI. | |
| max_bytes_per_variant | No | Per-variant byte ceiling; quality is searched down per width to fit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| input | No | Summary of the source image, when one was read. | |
| notes | No | ||
| steps | No | ||
| metrics | No | Operation-specific measurements (e.g. comparison scores). | |
| outputs | No | ||
| operation | Yes | Tool that produced this result. | |
| sizeChange | No | ||
| inlineImageIncluded | No | True when an image block accompanies this result for vision-capable clients. |