1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

images → Resize an Image

AI-generated

Overview

The Resize an Image operation in the "images" resource of this custom n8n node allows users to resize an image file to specified width and height dimensions. This is useful for automating image processing tasks such as preparing images for web uploads, generating thumbnails, or standardizing image sizes for further processing.

Practical examples:

  • Automatically resizing user-uploaded profile pictures to a standard size.
  • Generating smaller preview images from large originals for faster website loading.
  • Batch-processing product images for e-commerce platforms.

Properties

Name Meaning
Width The width to resize the image to (must be between 1 and 10,000 pixels).
Height The height to resize the image to (must be between 1 and 10,000 pixels).
Image file Image file to be processed. This is the input image that will be resized.
Binary Property Name of the binary property to which to write the data of the processed (resized) file.

Output

  • Binary Data:
    The output contains the resized image as binary data. The binary property name is set by the "Binary Property" input. The output item will have:
    • The original JSON data preserved.
    • A new or updated binary property containing the resized image file, with appropriate filename and MIME type.

Example output structure:

{
  "json": { /* original item data */ },
  "binary": {
    "data": {
      "data": "<Buffer ...>",
      "fileName": "resized-image.jpg",
      "mimeType": "image/jpeg"
    }
  },
  "pairedItem": { "item": 0 }
}

(The actual property name may differ if you set a different value for "Binary Property".)

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: You must configure the 1001fxApi credentials in n8n.
  • Environment: No additional environment variables are required beyond n8n's credential setup.

Troubleshooting

  • Common Issues:

    • Invalid Image File: If the input file is not a valid image, the API may return an error.
    • Dimension Limits: If "Width" or "Height" are outside the allowed range (1–10,000), the operation will fail.
    • Missing Binary Data: If the "Image file" property does not point to a valid binary property, the node will throw an error.
  • Error Messages:

    • "error": "Cannot read property 'fileName' of undefined"
      Resolution: Ensure the input item contains a valid binary property with the correct name.
    • "error": "Request failed with status code 401"
      Resolution: Check your 1001fx API credentials in n8n.
    • "error": "Invalid width or height"
      Resolution: Make sure the width and height values are within the allowed range.

Links and References

Discussion