Rotate Image in n8n
Rotate Image is an n8n module by PDF4me that rotates an image by a precise angle in one workflow step. Send the image as binary data, Base64, or a URL, set a rotation angle from 0 to 360 degrees, choose a background fill color, and receive the rotated file.
What this node does
PDF4me: Rotate Image rotates a JPG, PNG, GIF, or BMP image by any angle in one n8n step. Set Rotation Angle in degrees, Background Color to fill any area exposed by the rotation, and Proportionate Resize to keep the aspect ratio. Accepts input via Binary Data, Base64 String, or URL. Ideal for orientation correction, photo standardization, and content preparation workflows.
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 image-rotation requests securely.
Important Facts You Should Not Miss

Full node panel: image via Base64 String, 90-degree rotation with white background fill
Parameters
Required in the n8n UI: Input Data Type and Rotation Angle. Output File Name (default rotate_image_output.png), Background Color (default #FFFFFF), Proportionate Resize, Async, and Binary Data Output Name (default data) are optional. Conditional source fields (Input Binary Field, Base64 Image Content, Image URL) appear only when their matching Input Data Type is chosen.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Input Data Type | Required | How the source image enters the node. Binary Data reads from a previous node (default, most common). Base64 String accepts an encoded image. URL downloads it from a public link. | 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. | data |
| Base64 Image Content | Conditional | Base64-encoded image content (.jpg, .png, .gif, .bmp). Required when Input Data Type is Base64 String. | /9j/4AAQSkZJRgAB... |
| Image URL | Conditional | Publicly reachable URL to the image file. Required when Input Data Type is URL. | https://abc.com/photo.jpg |
| Output File Name | Optional | Filename of the rotated image returned by the node. Default is rotate_image_output.png. | rotate_image_output.png |
| Background Color | Optional | Hex color code used to fill areas exposed during rotation. Default is #FFFFFF (white). | #FFFFFF |
| Proportionate Resize | Optional | Toggle to maintain proportional dimensions during rotation, preventing distortion. On by default. | On |
| Rotation Angle | Required | Rotation angle in degrees, 0 to 360. Positive values rotate clockwise. | 90 |
| Async | Optional | Toggle background processing for large images or non-time-critical jobs. Off by default. | Off |
| Binary Data Output Name | Optional | Name of the binary property the output item exposes. Default is data. | data |
What Fields Does the Output Include?
| Field | Type | What it contains |
|---|---|---|
success | Boolean | True when the rotation completed successfully. Use to route error-handling branches. |
message | String | Descriptive status message confirming success or describing an error. |
fileName | String | Filename of the rotated image, set from Output File Name. |
mimeType | String | MIME type of the output image, for example image/png. |
fileSize | Number | Size of the rotated image file in bytes. |
rotationAngle | Number | The actual rotation angle that was applied, useful for tracking and verification. |
Binary (data) | Binary | The rotated image file under Binary Data Output Name (default data). Pass into Write Binary File, Email, or any storage upload. |
How Do I Set Up Rotate Image in n8n?
- Add PDF4me to your n8n workflow and set Action to Rotate Image.
- 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 fill the matching field.
- Enter Rotation Angle in degrees, 0 to 360.
- Optionally set Background Color to control the fill for areas exposed by the rotation, and toggle Proportionate Resize to preserve the aspect ratio.
- Optionally change Output File Name from the default
rotate_image_output.pngand Binary Data Output Name from the defaultdata. - Execute the node and route the rotated image into Write Binary File, Email, or cloud storage.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Rotate Image.
- A webhook receives a photo uploaded from a mobile device (Binary Data, property
data). - PDF4me Rotate Image runs with Rotation Angle set based on the detected orientation issue.
- The corrected image is saved to a shared photo gallery folder.
- A Read Binary File node loads a batch of scanned document images from a network folder.
- PDF4me Rotate Image is configured with a small corrective angle and Background Color set to white to prepare each scan for accurate OCR.
- The corrected images are passed into a downstream OCR or text-extraction step.
- An HTTP Request node downloads a supplier product image from a URL.
- PDF4me Rotate Image runs with Input Data Type URL and Proportionate Resize on to standardize orientation without distorting the product photo.
- The standardized image is uploaded to the catalog's image storage bucket.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Rotate Image |
| Input Data Type | Base64 String |
| Base64 Image Content | /9j/4AAQSkZJRgAB... |
| Output File Name | rotate_image_output.png |
| Background Color | #FFFFFF |
| Proportionate Resize | On |
| Rotation Angle | 90 |
| Async | Off |
| Binary Data Output Name | data |
| Credentials | PDF4me API credential |
Frequently Asked Questions
Related Actions
Same Task on Other Platforms
Use Cases
Photography and Image Orientation Correction
- Automatically correct orientation issues from mobile devices and digital cameras that capture images in incorrect orientations
- Process batch uploads of user-generated content to ensure consistent orientation across photo galleries and portfolios
- Standardize image orientations for professional photography workflows and client deliverables
Document Processing and Digital Asset Management
- Rotate scanned documents and images to proper reading orientation for OCR processing and archival systems
- Automate the correction of misoriented images in bulk document processing workflows for improved readability
- Standardize image orientations in content management systems and digital asset libraries for consistent presentation
Web Content and Social Media Optimization
- Automatically orient images for optimal display across different platforms and device orientations
- Process user-uploaded images for social media platforms that have specific orientation requirements
- Create standardized image orientations for responsive web design and mobile application interfaces