Overview
The Edit Image+ node for n8n enables advanced image editing by applying multiple operations in sequence to an input image. With the "Multi Step" operation, you can chain together various transformations such as blur, border, composite, create, crop, draw, rotate, resize, shear, add text, or make a color transparent—all within a single workflow step.
Common scenarios:
- Automating image processing pipelines (e.g., resizing and watermarking images before upload).
- Generating dynamic graphics (e.g., creating banners with custom text and shapes).
- Preparing images for machine learning or web publishing.
- Batch-editing images with consistent effects.
Practical examples:
- Resize an uploaded photo, add a border, and overlay a logo in one go.
- Create a blank image, draw shapes, and add text for automated report generation.
- Blur sensitive areas and crop images for privacy compliance.
Properties
Main Input Properties
Display Name | Type | Description |
---|---|---|
Property Name | String | Name of the binary property containing the image data. |
Operations | Fixed Collection | List of image operations to perform sequentially. Each operation has its own set of parameters (see below). |
Supported Operations in Multi Step
Each operation in the "Operations" collection supports specific properties:
1. Blur
- Blur (Number): Strength of the blur.
- Sigma (Number): Sigma value for the blur.
2. Border
- Border Color (Color): Color of the border.
- Border Width (Number): Width of the border.
- Border Height (Number): Height of the border.
3. Composite
- Composite Image Property (String): Binary property name of the image to composite on top.
- Operator (Options): How to combine the images (e.g., Over, Add, Multiply, etc.).
- Position X (Number): Horizontal position for compositing.
- Position Y (Number): Vertical position for compositing.
4. Create
- Background Color (Color): Background color of the new image.
- Image Width (Number): Width of the new image.
- Image Height (Number): Height of the new image.
5. Crop
- Width (Number): Crop width.
- Height (Number): Crop height.
- Position X (Number): X coordinate to start cropping.
- Position Y (Number): Y coordinate to start cropping.
6. Draw
- Primitive (Options): Shape to draw (Circle, Line, Rectangle).
- Color (Color): Color of the shape.
- Start Position X/Y (Number): Starting coordinates.
- End Position X/Y (Number): Ending coordinates.
- Corner Radius (Number): For rectangles, radius for rounded corners.
7. Resize
- Width (Number): New width.
- Height (Number): New height.
- Option (Options): Resize mode (ignore aspect ratio, percent, only if larger/smaller, etc.).
8. Rotate
- Rotate (Number): Degrees to rotate.
- Background Color (Color): Background fill for exposed areas after rotation.
9. Shear
- Degrees X (Number): Shear along X axis.
- Degrees Y (Number): Shear along Y axis.
10. Text
- Text (String): Text to render.
- Font Size (Number): Size of the text.
- Font Color (Color): Color of the text.
- Position X/Y (Number): Coordinates for the text.
- Width/Height (Number): Area for the text.
- Gravity (Options): Text alignment (Center, North, South, etc.).
- Max Line Length (Number): Maximum characters per line before wrapping.
- Font Name or ID (Options): Font to use.
11. Transparent
- Color (Color): Color to make transparent.
Output Options (applies to all operations)
- File Name (String): File name for the output image.
- Format (Options): Output format (bmp, gif, jpeg, png, tiff, webp).
- Quality (Number): Compression quality (for jpeg/png/tiff).
- Font Name or ID (Options): Font for text operations.
Output
- The node outputs an item with:
- json: Contains the original JSON data from the input item.
- binary: Contains the processed image under the property specified by "Property Name".
data
: The edited image as a binary buffer.mimeType
: MIME type of the output image (e.g.,image/png
).fileExtension
: File extension based on the chosen format.fileName
: If specified, the file name; otherwise, inherited or generated.
If the operation is "Get Information", the json
field will contain image metadata (such as resolution).
Dependencies
- External Libraries:
- gm (GraphicsMagick/ImageMagick wrapper)
- tmp-promise (temporary files for compositing)
- get-system-fonts (for font selection)
- n8n Requirements:
- Node must have access to GraphicsMagick or ImageMagick installed on the system.
- No API keys required.
- Sufficient disk space for temporary files during compositing.
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 Operation Parameters:
Error: "Parameter ... is missing"
Resolution: Check that all required fields for each operation are filled.ImageMagick/GraphicsMagick Not Installed:
Error: "Command failed: gm ..."
Resolution: Install GraphicsMagick or ImageMagick on your server.Font Not Found:
Error: "Unable to load font ..."
Resolution: Make sure the specified font is available on the system or use "default".File System Permissions:
Errors related to writing temp files (composite operation).
Resolution: Ensure the n8n process has write permissions to the temp directory.Output Format Issues:
If the output image is not as expected, check the "Format" and "Quality" options.