GET
/
transform

How to use

The rotate transformation allows you to rotate the image by a specified angle.

Pass the following query param rotate=angle to the API endpoint, where angle is the rotation in degrees.

For example: rotate=90

Valid values for the angle are: 0, 90, 180, and 270 degrees. The default value is 0, which leaves the image unchanged.

Effect of Rotation

  • 0 degrees: No rotation (default)
  • 90 degrees: Rotates the image 90 degrees clockwise
  • 180 degrees: Rotates the image 180 degrees (upside down)
  • 270 degrees: Rotates the image 90 degrees counterclockwise

This transformation can be used to correct image orientation or create different views of the same image.

Original Image

URL : https://www.thunderimage.com/sample/yosemite.jpg

Image rotated 90 degrees

URL: /transform?url=https://www.thunderimage.com/sample/yosemite.jpg&rotate=90

Best Practices

  • Use rotation when you need to correct the orientation of an image or create a specific view.
  • Remember that rotating by 90 or 270 degrees will change the aspect ratio of the image.
  • Consider combining rotation with other transformations like resize to maintain the desired dimensions after rotation.

Authorizations

x-api-key
string
headerrequired

API key required for authentication

Query Parameters

url
string
required

The URL of the image to be transformed.

rotate
enum<integer>
default: 0

Rotates the image by the specified angle. Valid values are 0, 90, 180, and 270 degrees. Default is 0.

Available options:
0,
90,
180,
270

Response

200 - image/jpeg

The transformed image in JPEG format.