Resize Image using n8n action
PDF4me Resize Image scales images with precise dimension control through n8n automation workflows. Process images via n8n triggers, binary data, base64 strings, or public URLs to resize by percentage (50%, 200%, etc.) or specific pixel dimensions (width/height) with aspect ratio preservation, quality optimization, and flexible scaling options. This solution is ideal for web optimization, thumbnail creation, social media preparation, image standardization, mobile optimization, and automated image resizing workflows that require accurate scaling with preserved quality and seamless integration.
Setup
Add the PDF4me "Resize Image" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "Resize Image" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Resize Image action. Configure these parameters to control image resizing.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Credential to connect with | String | Yes | PDF4me authentication configuration - Select your PDF4me account credentials for API access. Choose from existing configured credentials or create new ones through the n8n credential management system |
| Action | String | Yes | PDF4me operation selection - Choose the specific PDF4me action to perform. This parameter determines which processing operation will be executed on your images |
| Input Data Type | String | Yes | PDF4me image input format selection Choose the format of your source image data input. PDF4me supports multiple input types with different field requirements |
| 1) Binary Data | Yes (One Required) | 1) Binary Data - Use "Input Binary Field" to reference image file from previous node | |
| 2) Base64 String | Yes (One Required) | 2) Base64 String - Use "Base64 Image Content" field for encoded image data | |
| 3) URL | Yes (One Required) | 3) URL - Use "Image URL" field to provide a public/open permission URL to the image file | |
| Input Binary Field | Binary | Yes (If Binary Data) | PDF4me binary image file input - Reference source image file (.jpg, .png, .gif, .bmp) from previous n8n node or file upload. PDF4me processes binary image files with automatic format detection and validation. Required when Input Data Type is "Binary Data" |
| Base64 Image Content | String | Yes (If Base64 String) | PDF4me base64 encoded image input - Provide source image data (.jpg, .png, .gif, .bmp) as base64 encoded string for secure transmission. PDF4me automatically decodes and processes the image content. Required when Input Data Type is "Base64 String" |
| Image URL | String | Yes (If URL) | PDF4me public image URL input - Provide a public/open permission URL to the source image file (.jpg, .png, .gif, .bmp) to be processed for resizing. PDF4me downloads and processes the file from the provided URL. Required when Input Data Type is "URL" |
| Output File Name | String | Yes | PDF4me output filename configuration - Specify the name for the generated resized image file with proper extension (.jpg, .png, .gif, .bmp). This is an input parameter that configures what the output file will be named. PDF4me ensures unique naming and validates file format compliance |
| Resize Type | String | Yes | PDF4me scaling method selection - Choose the method for resizing the image. PDF4me supports percentage-based scaling and specific pixel dimension control for flexible image processing |
| Percentage | Yes (One Required) | Percentage-based scaling - Resize image by percentage of original dimensions (e.g., 50% = half size, 200% = double size) | |
| Specific | Yes (One Required) | Specific pixel dimensions - Resize image to exact pixel dimensions with precise width and height control | |
| Resize Percentage | Number | Yes (If Percentage) | PDF4me percentage scaling value - Define the scaling percentage for the image (1-1000). Values below 100 reduce size, values above 100 increase size. PDF4me maintains quality while scaling proportionally. Required when Resize Type is "Percentage" |
| Width | Number | Yes (If Specific) | PDF4me target width specification - Define the exact width in pixels for the resized image. PDF4me processes the image to match this width while respecting aspect ratio settings. Required when Resize Type is "Specific" |
| Height | Number | Yes (If Specific) | PDF4me target height specification - Define the exact height in pixels for the resized image. PDF4me processes the image to match this height while respecting aspect ratio settings. Required when Resize Type is "Specific" |
| Maintain Aspect Ratio | Boolean | Yes | PDF4me aspect ratio preservation - Enable to preserve the original image proportions during resizing. When enabled, PDF4me automatically calculates proportional dimensions to prevent image distortion |
| Async | Boolean | No | PDF4me asynchronous processing - Enable asynchronous processing for large images or when processing time is not critical. When enabled, the operation runs in the background and returns immediately |
| Binary Data Output Name | String | Yes | PDF4me output variable configuration - Define the variable name for accessing the generated resized image binary data in your n8n workflow. This binary data can be used as input data in subsequent actions within your workflow |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | PDF4me image resize status indicator - Boolean flag indicating the success or failure of the image resizing process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflows | true |
| message | String | PDF4me resize status message - Human-readable status message providing details about the image resizing process result. Includes success confirmation or error details for troubleshooting | Image resized successfully |
| fileName | String | PDF4me generated image filename - The complete filename of the successfully generated resized image file with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | resize_image_output.jpg |
| mimeType | String | PDF4me output MIME type - MIME type of the generated image file (e.g., "image/jpeg", "image/png"). Useful for content type validation and proper file handling in web applications | image/jpeg |
| fileSize | Number | PDF4me processed image file size in bytes - The exact size of the generated resized image file in bytes, provided by PDF4me for storage planning and file transfer monitoring | 512000 |
| originalDimensions | String | PDF4me source image dimensions - The original width and height of the source image in pixels (e.g., "1920x1080") | 1920x1080 |
| newDimensions | String | PDF4me resized image dimensions - The new width and height of the resized image in pixels (e.g., "960x540") | 960x540 |
N8N Action Response
The PDF4me Resize Image API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"success": true,
"message": "Image resized successfully",
"fileName": "resize_image_output.jpg",
"mimeType": "image/jpeg",
"fileSize": 512000,
"originalDimensions": "1920x1080",
"newDimensions": "960x540"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | Image resized successfully |
| fileName | resize_image_output.jpg |
| mimeType | image/jpeg |
| fileSize | 512000 |
| originalDimensions | 1920x1080 |
| newDimensions | 960x540 |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB Image resized successfully
fileName: AB resize_image_output.jpg
mimeType: AB image/jpeg
fileSize: # 512000
originalDimensions: AB 1920x1080
newDimensions: AB 960x540
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual processed image file and information:
data
─────────────────────────────
File Name: resize_image_output.jpg
File Extension: jpg
Mime Type: image/jpeg
File Size: 512,000 bytes
Original Dimensions: 1920x1080
New Dimensions: 960x540
Scaling Factor: 50%
Aspect Ratio: Preserved
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Web Performance Optimization and Content Delivery
- Automatically resize product images for different display contexts (thumbnails, medium, large) to improve page load times
- Generate responsive image sets for modern web applications that require multiple image sizes
- Optimize user-uploaded images for social media platforms with specific dimension requirements
Content Management and Asset Processing
- Process bulk image collections for consistent sizing across digital asset libraries
- Automate the creation of standardized image formats for corporate branding and marketing materials
- Resize images from various sources to fit uniform layouts in newsletters, presentations, and documents
Mobile and Multi-Platform Optimization
- Generate mobile-optimized image versions to reduce bandwidth usage and improve user experience
- Create image variants for different screen densities and device types in mobile applications
- Automate image processing for cross-platform publishing workflows that require multiple image formats