← All tools
Rotate image
Imageimage.rotate
in: imageout: image
Rotate image by angle (degrees).
Pricing
- Price
- 0.125 cr / request
Prices in credits (1 credit = $0.01).
Rotate Image
Rotate an image by an arbitrary angle in degrees using the Sharp library.
When to use
- Fix orientation — correct portrait photos taken sideways (90°, 180°, 270°).
- Creative angle — apply non-orthogonal rotations (e.g. 15°) for design compositions.
- Normalize EXIF orientation — rotate and strip EXIF so all consumers see the same orientation.
Inputs & outputs
| Input modality | Image file (URL) |
| Output modality | Image file (GCS URL) |
| Max input size | 50 MB |
| Supported formats | JPEG, PNG, WebP, TIFF, AVIF |
Parameters
| Param | Required | Description |
|---|---|---|
angle | yes | Rotation angle in degrees. Positive = clockwise. Any number accepted (e.g. 45, -30, 270). |
background | no | Hex colour to fill exposed corners after rotation (e.g. #ffffff). Defaults to transparent for PNG, black for JPEG. |
Examples
90° clockwise rotation
{
"type": "image.rotate",
"input": { "image_url": "gs://infery-prod-media/photos/sideways.jpg" },
"params": { "angle": 90 }
}
15° tilt with white background fill
{
"type": "image.rotate",
"input": { "image_url": "gs://infery-prod-media/photos/product.png" },
"params": { "angle": 15, "background": "#ffffff" }
}
Pricing
Billed per megapixel of output image. See pricing dashboard for current rates.
Related capabilities
image.crop— crop after rotating to remove exposed cornersimage.flatten— flatten transparency before converting to JPEGimage.pipeline— chain rotate with other ops in a single execution
Examples
90° clockwise
{
"angle": 90
}