Actions14
Image → Scale Image
AI-generatedSummary
Scale an image by specifying target width and/or height, scaling mode, and output format.
Inputs
- Image Binary Field (required) — Name of the binary field containing the input image to scale.
- Width — Target width in pixels. Set to 0 or leave empty to keep original scale when only height is specified.
- Height — Target height in pixels. Set to 0 or leave empty to keep original scale when only width is specified.
- Scaling Mode — Method to resize the image: Fit (preserve aspect ratio and fit within bounds), Fill (crop to fill bounds), or Stretch (ignore aspect ratio). Defaults to Fit.
- Output Format — Desired output image format; options are PNG, JPEG, or WebP. Defaults to PNG.
Output shape
a single item containing the scaled image as binary data plus JSON metadata
Returns an object with JSON fields 'format', 'width', and 'height' describing the output image, plus a binary field 'data' containing the scaled image file. The binary filename corresponds to 'scaled-image' with the appropriate extension. The binary mimeType matches the output format.
Examples
Example 1: Scaling an image to 300x200 pixels preserving aspect ratio
Set 'imageBinaryField' to the binary property containing the image data (e.g. 'data'), set 'Width' to 300, 'Height' to 200, use default 'Fit' mode, and select the desired 'Output Format' (e.g. PNG). The node outputs a resized image binary with metadata.