Chuyển tới nội dung chính

Rotate & Flip

PreviewProxy supports rotating and flipping images as part of the transform pipeline.

Rotate

The rotate parameter rotates the image clockwise by the specified number of degrees.

Accepted values: 90, 180, 270

/r90/https://example.com/img.jpg
ValueEffect
9090 degrees clockwise
180180 degrees (upside-down)
270270 degrees clockwise (90 degrees counter-clockwise)

Flip

The flip parameter flips the image along an axis.

Accepted values: h, v

/flip=h/https://example.com/img.jpg
ValueEffect
hHorizontal flip (mirror left-right)
vVertical flip (upside-down)

Combining Rotate and Flip

Both parameters can be combined in a single request. The rotation is applied before the flip.

/r90,flipv/https://example.com/img.jpg

Combining with Other Transforms

Rotate and flip can be combined with resize and format conversion in the same request.

/w=400,webp,r180/https://example.com/img.jpg
/800x600,fliph,jpeg/https://example.com/img.jpg