Edit Image+

Edits an image like blur, resize or adding border and text

Overview

The Edit Image+ node for n8n allows you to perform advanced image editing operations directly within your workflows. The Resize operation under the Default resource enables you to change the dimensions of an input image, with several options for how resizing is handled (e.g., maintaining aspect ratio, resizing by percentage, etc.). This is useful in scenarios such as:

  • Preparing images for web or mobile display by standardizing their size.
  • Reducing file sizes for faster uploads or downloads.
  • Generating thumbnails or previews from larger images.
  • Automating batch image processing tasks.

Example use cases:

  • Automatically resize user-uploaded profile pictures to a maximum width and height.
  • Convert product images to a specific format and size for e-commerce listings.
  • Prepare images for social media posts with required dimensions.

Properties

Below are the supported input properties for the Resize operation:

Display Name Type Description
Property Name String Name of the binary property in which the image data can be found.
Width Number New width of the image.
Height Number New height of the image.
Option Options How to resize the image:
- Ignore Aspect Ratio: Resize exactly to specified values.
- Maximum Area: Specified values are maximum area.
- Minimum Area: Specified values are minimum area.
- Only if Larger: Resize only if image is larger than width or height.
- Only if Smaller: Resize only if image is smaller than width or height.
- Percent: Width and height are specified in percents.
Options Collection Additional settings:
- File Name (String): File name to set in binary data.
- Format (Options): Output image format (bmp, gif, jpeg, png, tiff, webp).
- Quality (Number): Compression level for jpeg/png/tiff (0–100, best at 100).

Output

The node outputs an item with the following structure:

  • json: Contains the original JSON data from the input item.
  • binary: Contains the processed image data under the property name specified by "Property Name". The binary object includes:
    • data: The resized image as a binary buffer.
    • mimeType: MIME type of the output image (e.g., image/jpeg, image/png).
    • fileExtension: File extension based on the selected format.
    • fileName: (Optional) Custom file name if provided.

If the input item already contains other binary data, it will be preserved alongside the resized image.


Dependencies

  • External Libraries:
  • n8n Requirements:
    • No special credentials required for resizing.
    • The n8n instance must have access to the underlying system's GraphicsMagick or ImageMagick installation.

Troubleshooting

Common Issues:

  • Missing Binary Data:
    Error: "No binary data property '...' exists on item!"
    Resolution: Ensure the input item contains the correct binary property as specified in "Property Name".

  • Invalid Image Format:
    Error: "Input buffer contains unsupported image format"
    Resolution: Make sure the input image is in a supported format (e.g., JPEG, PNG, GIF, BMP, TIFF, WebP).

  • Image Too Large/Small:
    If using "Only if Larger" or "Only if Smaller", the image may not be resized if it doesn't meet the condition.

  • Format/Quality Issues:
    If the output format or quality is not set correctly, the resulting image may not be as expected. Double-check the "Format" and "Quality" options.

  • GraphicsMagick/ImageMagick Not Installed:
    Error: "Command failed: gm convert ..."
    Resolution: Ensure that either GraphicsMagick or ImageMagick is installed and accessible in the environment where n8n runs.


Links and References


Discussion