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 to Fit Given Dimensions
AI-generatedOverview
This node allows you to scale an image to fit within specified width and height dimensions. It is useful in scenarios where you need to resize images for web uploads, thumbnails, or any automation that requires images to conform to certain size constraints. For example, you might use this node to automatically resize user-uploaded profile pictures or to prepare product images for an e-commerce platform.
Properties
| Name | Meaning |
|---|---|
| Width | The width to scale the image to (must be between 1 and 10,000 pixels). |
| Height | The height to scale the image to (must be between 1 and 10,000 pixels). |
| Image file | Image file to be processed. |
| Binary Property | Name of the binary property to which to write the data of the processed image file. |
Output
Binary Data:
The output will contain a binary field with the name specified in "Binary Property". This field holds the scaled image file.- The original binary data (if present) is preserved alongside the new scaled image.
- The filename and content type are set according to the processed image.
JSON Field:
Thejsonfield is passed through from the input item and may include an error message if processing fails.
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 standard n8n configuration.
Troubleshooting
Common Issues:
- Invalid Dimensions: If "Width" or "Height" are outside the allowed range (1–10,000), the API may return an error.
- Missing Binary Data: If the specified "Image file" is not found in the input item's binary properties, the node will fail.
- Authentication Errors: If the
1001fxApicredential is missing or invalid, requests will fail with authentication errors.
Error Messages:
"error": "Cannot read property 'fileName' of undefined": Indicates the specified binary property does not exist on the input item."error": "Request failed with status code 401": Check your API credentials.- Other errors returned by the API will appear in the
json.errorfield.