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.
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

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 Type | Fields you fill in | Best fit |
|---|---|---|
| Percentage | Resize Percentage, for example 50 to halve or 200 to double | Mixed-size inputs that should all shrink or grow by the same proportion, keeping their relative differences |
| Specific | Width and Height in pixels | A 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.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Action | Required | Selects the PDF4me node action to run. Choose Resize Image. | Resize Image |
| Input Data Type | Required | Format of the source image input. Choose Binary Data (from a previous node), Base64 String, or URL. | Binary Data |
| Input Binary Field | Conditional | Name of the binary property on the incoming n8n item that holds the image. Required when Input Data Type is Binary Data. Defaults to data. | data |
| Base64 Image Content | Conditional | Base64-encoded content of the source image. Required when Input Data Type is Base64 String. | /9j/4AAQSkZJRgAB... |
| Image URL | Conditional | Publicly reachable HTTPS URL to the source image. Required when Input Data Type is URL. | https://example.com/photo.jpg |
| Output File Name | Required | Filename for the resized image. Include the extension matching the output format. | resize_image_output.jpg |
| Resize Type | Required | Scaling method. Percentage scales relative to the original size, Specific targets exact pixel dimensions. Your choice decides which fields appear next. | Percentage |
| Resize Percentage | Conditional | Scaling percentage relative to the original. Below 100 reduces, above 100 enlarges. Required when Resize Type is Percentage. | 50 |
| Width | Conditional | Target width in pixels. Required when Resize Type is Specific. | 800 |
| Height | Conditional | Target height in pixels. Required when Resize Type is Specific. | 600 |
| Maintain Aspect Ratio | Optional | Toggle that preserves the original proportions so the image is not stretched. Leave enabled unless you need forced dimensions. | true |
| Async | Optional | Toggle that runs the resize in the background instead of holding the workflow execution open. Useful for large images or long batches. | true |
| Binary Data Output Name | Optional | Name of the binary property the output item exposes. Defaults to data. | data |
Output Fields
A successful run returns one n8n item carrying the resized image and its dimension report.
| Field | Type | What it contains |
|---|---|---|
Binary (data) | Binary | The resized image, under Binary Data Output Name (default data). |
fileName | String | Generated filename, matching Output File Name. |
mimeType | String | MIME type of the output image, for example image/jpeg or image/png. |
fileSize | Number | Size of the resized image in bytes. |
originalDimensions | String | Width and height of the source image in pixels, for example 1920x1080. |
newDimensions | String | Width and height after resizing, for example 960x540. Compare it against your target to confirm aspect ratio behaviour. |
success | Boolean | True when the resize completed, false on failure. Use it to branch error handling. |
message | String | Human-readable status message, carrying success confirmation or error detail. |
How Do I Set Up Resize Image in n8n?
- Add PDF4me to your n8n workflow and choose the Resize Image action.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching source image field.
- Set Resize Type to Percentage and fill in Resize Percentage, or to Specific and fill in Width and Height.
- Leave Maintain Aspect Ratio enabled to avoid stretching, and enable Async for large images or long batches.
- Set Output File Name, execute the node, and check
newDimensionson the output to confirm the result.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Resize Image.
- A new product image lands in cloud storage.
- Resize Image runs in Specific mode at the thumbnail grid dimensions.
- The thumbnail is written back alongside the full-size original.
- A webhook receives a photo submitted through a form.
- Resize Image runs in Percentage mode to reduce it proportionally.
- The smaller file is stored, keeping storage and bandwidth in check.
- A Loop Over Items node iterates an existing folder of mixed-size images.
- Resize Image applies one consistent setting to every item, with Async enabled.
- The library ends up uniform without anyone opening an editor.
- An editorial image is pulled from a CMS.
- Resize Image brings it down to the display width first.
- Compress Image then reduces the file size further before publishing.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| 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 |
| Width / Height (Specific mode) | 800 / 600 |
| Maintain Aspect Ratio | true |
| Async | true |
| Binary Data Output Name | data |