Actions74
- ai Actions
- array Actions
- audiovideo Actions
- carbone Actions
- charts Actions
- code Actions
- data Actions
- datetime Actions
- events Actions
- files Actions
- geo Actions
- hellospaces Actions
- images Actions
- Get Metadata of an Image
- Scale an Image
- Overlay an Image on another Image
- Scale an Image to Fit Given Dimensions
- Resize an Image
- Mask an Image with Another Image
- Mask an Image with a Circle Mask
- Crops an image by the given x, y, width and height paramters.
- Convert Texts to an Image
- Convert HTML String or URL to an Image
- Generates a QRCode with given text and color.
- Get EXIF from Image
- Remove EXIF from Image
- Modify Image EXIF
- playground Actions
- spreadsheet Actions
- stripe Actions
- youtube Actions
images → Scale an Image
AI-generatedOverview
The "Scale an Image" operation in the images resource of this n8n node allows you to resize an image by a specified scaling factor. This is useful for automating image processing tasks such as preparing images for web use, generating thumbnails, or batch-resizing images before uploading them to other services.
Practical examples:
- Automatically resizing user-uploaded profile pictures to fit a standard size.
- Scaling down large images before sending them via email or storing them in a database.
- Creating smaller preview versions of product images for an e-commerce site.
Properties
| Name | Meaning |
|---|---|
| Factor | The factor to scale the image by (e.g., 0.5 to reduce size by half, 2 to double size). |
| Image file | Image file to be processed. |
| Binary Property | Name of the binary property to which to write the data of the processed image. |
Output
- The output will contain a binary field with the scaled image data.
- The name of the binary property containing the output image is determined by the Binary Property input (default:
data). - The binary data includes:
- The scaled image file.
- Metadata such as filename and content type, preserved from the API response.
Example output structure:
{
"json": { /* original item JSON */ },
"binary": {
"data": {
"data": "<Buffer ...>", // The scaled image binary data
"fileName": "scaled-image.jpg",
"mimeType": "image/jpeg"
}
},
"pairedItem": { "item": 0 }
}
Dependencies
- External Service: Requires access to the 1001fx API.
- API Key: You must configure the
1001fxApicredential in n8n. - Environment: No additional environment variables are required beyond the API key setup.
Troubleshooting
Common issues:
- Invalid scaling factor: If the factor is not within the allowed range (0.000001 to 10), the API may return an error.
- Missing or invalid image file: If the image file is not provided or is corrupted, the operation will fail.
- Incorrect binary property name: If the specified binary property name does not match the expected input/output, the result may not be accessible in subsequent nodes.
Error messages:
"error": "Request failed with status code 400"– Check that all required properties are set correctly and the image file is valid."error": "Invalid API key"– Ensure your 1001fx API credentials are configured properly in n8n."error": "Cannot read property 'split' of undefined"– This may occur if the API response headers are missing; check the API service status.