Skip to main content

Resize Image in n8n

Resize Image is a PDF4me node action in n8n that scales an image either by a percentage of its original size or to exact pixel width and height, with aspect ratio preservation available as a toggle. Use it to generate thumbnails, normalise user uploads to a house size, or shrink oversized photos before they reach storage.

What this node does

PDF4me: Resize Image takes an image from Binary Data, a Base64 String, or a URL and returns a scaled copy. The Resize Type field decides the method: Percentage scales relative to the original, which suits mixed-size inputs, while Specific targets an exact width and height in pixels for fixed layout slots. Because the node runs once per incoming item, one configured node resizes an entire batch with identical settings.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog →

Authenticating Your API Request​

Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate resize requests securely.

Important Facts You Should Not Miss​

Resize Type decides which fields appear
Choosing Percentage reveals Resize Percentage. Choosing Specific reveals Width and Height instead. You never fill in both sets.
Maintain Aspect Ratio prevents distortion
Leave this toggle on unless you deliberately need non-proportional dimensions. With it off, a mismatched width and height will stretch the picture.
Enlarging cannot invent detail
A percentage above 100 increases pixel dimensions but not sharpness. Always start from the highest-resolution source available.
PDF4me node in n8n set to Action Resize Image, Input Data Type Binary Data, Input Binary Field data, Output File Name resize_image_output.jpg, Resize Type Percentage, Resize Percentage 50, with Maintain Aspect Ratio and Async toggles enabled

PDF4me Resize Image parameters panel in n8n, shown in Percentage mode

Percentage vs Specific: Which Resize Type Should You Use?​

The two modes solve different problems, and picking the wrong one is the most common source of unexpected output sizes.

Resize TypeFields you fill inBest fit
PercentageResize Percentage, for example 50 to halve or 200 to doubleMixed-size inputs that should all shrink or grow by the same proportion, keeping their relative differences
SpecificWidth and Height in pixelsA fixed layout slot, thumbnail grid, or platform that demands exact dimensions regardless of the source size

What Parameters Does Resize Image Need?​

Required: Action, Input Data Type, the field matching that input type, Output File Name, Resize Type, and the dimension fields that Resize Type reveals. Async and Binary Data Output Name carry working defaults.

ParameterRequiredWhat it doesExample
Input Data TypeRequiredChoose how to provide the image file to resize. Options: Binary Data, Base64 String, URL. Default is `Binary Data`.Binary Data
Input Binary FieldConditionalName of the binary property that contains the image file. Shown when Input Data Type is Binary Data. Default is `data`.data
Base64 Image ContentConditionalBase64 encoded image content. Shown when Input Data Type is Base64 String./9j/4AAQSkZJRgAB...
Image URLConditionalURL to the image file to resize. Shown when Input Data Type is URL.https://example.com/photo.jpg
Output File NameOptionalName for the output resized image file. Default is `resize_image_output.jpg`.resize_image_output.jpg
Resize TypeRequiredResize type: by percentage or specific dimensions. Options: Percentage, Specific. Default is `Percentage`.Percentage
Resize PercentageConditionalResize percentage (used if Resize Type is Percentage). Shown when Resize Type is Percentage. Default is `50`.50
WidthConditionalWidth in pixels (used if Resize Type is Specific). Shown when Resize Type is Specific. Default is `800`.800
HeightConditionalHeight in pixels (used if Resize Type is Specific). Shown when Resize Type is Specific. Default is `600`.600
Maintain Aspect RatioOptionalWhether to maintain aspect ratio when resizing. Default is `Yes`.Yes
AsyncOptionalNot used: the node always sends the request to PDF4me as asynchronous (IsAsync true), whatever this is set to. Default is `Yes`.Yes
Binary Data Output NameOptionalCustom name for the binary data in n8n output. Default is `data`.data

Output Fields​

A successful run returns one n8n item carrying the resized image and its dimension report.

Output​

Fields the node returns.

FieldTypeWhat it contains
successBooleanTrue when the operation succeeded.
messageStringStatus message, `Image resized successfully`.
fileNameStringFile name of the resulting file.
mimeTypeStringAlways `image/jpeg`, whatever the format of the input image.
fileSizeNumberSize of the resulting file in bytes.
resizeTypeStringResize Type that was used (Percentage or Specific).
dataBinaryThe resized image.

How Do I Set Up Resize Image in n8n?​

  1. Add PDF4me to your n8n workflow and choose the Resize Image action.
  2. In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
  3. Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching source image field.
  4. Set Resize Type to Percentage and fill in Resize Percentage, or to Specific and fill in Width and Height.
  5. Leave Maintain Aspect Ratio enabled to avoid stretching, and enable Async for large images or long batches.
  6. Set Output File Name, execute the node, and check newDimensions on the output to confirm the result.

Typical Setups​

Workflow ExamplesCommon n8n workflow patterns using Resize Image.
Thumbnails from product uploads
  1. A new product image lands in cloud storage.
  2. Resize Image runs in Specific mode at the thumbnail grid dimensions.
  3. The thumbnail is written back alongside the full-size original.
Shrink oversized user uploads
  1. A webhook receives a photo submitted through a form.
  2. Resize Image runs in Percentage mode to reduce it proportionally.
  3. The smaller file is stored, keeping storage and bandwidth in check.
Batch normalise an image library
  1. A Loop Over Items node iterates an existing folder of mixed-size images.
  2. Resize Image applies one consistent setting to every item, with Async enabled.
  3. The library ends up uniform without anyone opening an editor.
Resize then compress for the web
  1. An editorial image is pulled from a CMS.
  2. Resize Image brings it down to the display width first.
  3. Compress Image then reduces the file size further before publishing.

Practical Tips​

Resize before you compress, not after
Reducing dimensions first means the compressor has less data to work on, which usually gives a better result than compressing a full-size image.
Leave Maintain Aspect Ratio on by default
Turning it off only makes sense when a target slot genuinely demands non-proportional dimensions. Otherwise it silently stretches faces and logos.
Use Percentage for mixed-size inputs
When sources vary, a fixed pixel target crops or pads inconsistently. A percentage keeps every image in proportion to where it started.
Read newDimensions rather than assuming
The output reports both original and new dimensions, which is the fastest way to confirm aspect ratio handling did what you expected.
Match the Output File Name extension to the format
Naming a PNG output with a .jpg extension confuses downstream nodes and any application that opens the file by extension.
Enable Async for large batches
Long-running batches are exactly where a synchronous call risks timing out, and Async keeps the execution from being held open.

Cheat Sheet​

FieldValue
ActionResize Image
Input Data TypeBinary Data
Input Binary Fielddata
Output File Nameresize_image_output.jpg
Resize TypePercentage
Resize Percentage50
Width / Height (Specific mode)800 / 600
Maintain Aspect Ratiotrue
Asynctrue
Binary Data Output Namedata

Common Questions​

Should I resize by percentage or by exact pixel dimensions?+
Use Percentage when the source images vary in size and you want them all reduced or enlarged by the same proportion, for example halving every upload. Use Specific when a target slot demands fixed dimensions, such as a thumbnail grid or a platform that requires an exact width and height.
What happens if I turn off Maintain Aspect Ratio?+
With Maintain Aspect Ratio on, the original proportions are preserved so the image is never stretched. Turning it off lets the width and height you supply be applied independently, which will distort the picture if the target aspect ratio differs from the source. Leave it on unless you specifically need to force non-proportional dimensions.
Does enlarging an image with a percentage above 100 improve its quality?+
No. Scaling above 100 percent increases the pixel dimensions but cannot add detail that was never captured, so an enlarged image will look softer than a natively larger original. Enlarge only when a layout demands the dimensions, and prefer starting from the highest-resolution source you have.
When should I enable Async on the Resize Image node?+
Async Processing runs the resize in the background rather than holding the workflow execution open, which helps with large source images or long batch runs where a synchronous call might otherwise time out.
How do I resize many images in one n8n workflow?+
Feed the images in as multiple items, for example from a folder listing or a Loop Over Items node, and place Resize Image after it. The node runs once per item, so a single configured node handles the whole batch with identical settings rather than needing one node per file.

Same Task on Other Platforms​

Get Help​