OPTIMIZE
AI-generatedSummary
Optimize an image from an input binary field into specified output formats, optionally limiting the file size, returning one output per chosen format with optimized binary data.
Inputs
- Input Binary Field (required) — The name of the input binary field containing the image to optimize.
- Max File Size — Optional maximum file size in bytes to aim for in the optimized output.
- Output Formats (required) — List of image formats to optimize and output, supported formats are PNG, JPEG, WebP, and AVIF.
Output shape
a list of optimized image items per output format, each containing binary data and JSON metadata
Each output item is paired with its input item. The output images are minified and have file extensions and MIME types corresponding to their output format. Errors stop execution unless 'continue on fail' is enabled, in which case error info is returned.