Actions80
- Extract Text From Word
- Find And Replace Text
- Convert PDF To Editable PDF Using OCR
- Create Swiss QR Bill
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Create PDF/A
- Convert HTML To PDF
- Convert Markdown To PDF
- Upload File To PDF4me
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Fill PDF Form
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- AI-Invoice Parser
- AI-Process HealthCard
- AI-Process Contract
- Generate Barcode
- Classify Document
- Parse Document
- Linearize PDF
- Flatten PDF
- Convert To PDF
- Json To Excel
- Convert PDF To Excel
- Convert PDF To Word
- Convert PDF To PowerPoint
- Convert VISIO
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Extract Pages
- Merge Multiple PDFs
- Overlay PDFs
- Rotate Document
- Rotate Page
- Sign PDF
- URL to PDF
- Add Image Watermark To Image
- Add Text Watermark To Image
- Compress Image
- Convert Image Format
- Create Images From PDF
- Flip Image
- Get Image Metadata
- Image Extract Text
- Remove EXIF Tags From Image
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Image
- Rotate Image By EXIF Data
- Compress PDF
- Get PDF Metadata
- Repair PDF Document
- Get Document From Pdf4me
- Update Hyperlinks Annotation
- Protect Document
- Unlock PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Generate Document Single
- Generate Documents Multiple
- Get Tracking Changes In Word
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Attachment From PDF
- Extract Text By Expression
- Extract Table From PDF
- Extract Resources
Overview
This node provides an image resizing operation that allows users to resize images in various input formats. It supports resizing images provided as binary data from a previous node, base64-encoded strings, or via a URL pointing to the image file. Users can specify the resizing either by a percentage scale or by explicit width and height dimensions, with an option to maintain the aspect ratio.
Common scenarios for this node include:
- Automatically resizing uploaded images before further processing or storage.
- Preparing images for web display by reducing their size.
- Standardizing image dimensions in workflows involving image manipulation or document generation.
Practical example:
- A user receives images from an upload node (binary data), resizes them to 50% of their original size while maintaining aspect ratio, and then passes the resized images to a PDF generation node.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the image file to resize: "Binary Data" (from previous node), "Base64 String", or "URL". |
| Input Binary Field | Name of the binary property containing the image file (used if Input Data Type is "Binary Data"). |
| Base64 Image Content | Base64 encoded string representing the image content (used if Input Data Type is "Base64 String"). |
| Image URL | URL to the image file to resize (used if Input Data Type is "URL"). |
| Output File Name | Desired name for the output resized image file. |
| Resize Type | Method of resizing: "Percentage" (scale by percent) or "Specific" (set exact dimensions). |
| Resize Percentage | Percentage to resize the image by (used if Resize Type is "Percentage"). |
| Width | Target width in pixels (used if Resize Type is "Specific"). |
| Height | Target height in pixels (used if Resize Type is "Specific"). |
| Maintain Aspect Ratio | Whether to keep the original aspect ratio when resizing (true/false). |
| Async | Enable asynchronous processing (true/false). |
Output
The node outputs the resized image data in JSON format. The output includes the resized image as binary data under a specified binary property, named according to the workflow's conventions. The output also contains metadata such as the filename set by the user.
If the input was binary data, the output will be binary data representing the resized image. If the input was base64 or URL, the output will similarly contain the resized image in binary form ready for downstream nodes.
Dependencies
- Requires access to image processing capabilities, likely through an external API or internal library (not explicitly shown in the source).
- May require an API key or authentication token configured in n8n credentials to access the image processing service.
- Network access is needed if using image URLs.
Troubleshooting
Common issues:
- Providing an invalid or inaccessible image URL may cause failures.
- Incorrect base64 strings or corrupted binary data will result in errors during resizing.
- Specifying zero or negative values for width, height, or percentage will likely cause errors.
- Not maintaining aspect ratio when resizing to specific dimensions may distort images unexpectedly.
Error messages:
- Errors related to missing or invalid input data typically indicate misconfiguration of the input properties.
- Authentication or permission errors suggest missing or incorrect API credentials.
- Timeout or network errors may occur when fetching images from URLs.
Resolutions:
- Verify the correctness and accessibility of image URLs.
- Ensure base64 strings are properly encoded.
- Use valid positive numbers for resizing parameters.
- Configure required API credentials in n8n settings.
- Enable "Continue on Fail" in the node settings to handle individual item errors gracefully.
Links and References
- n8n Documentation
- General image resizing concepts: https://en.wikipedia.org/wiki/Image_scaling
- Base64 encoding reference: https://en.wikipedia.org/wiki/Base64