- Media API
- Transformations
- Rotate
- flip
flip
The flip transformation mirrors an image along a specified axis. You can flip horizontally (left-right), vertically (top-bottom), or both axes. This is useful for creating mirrored effects, correcting image orientation, or generating variations of the same image.
Serving Content via CDN
The Media API is a CDN-based service that serves transformed images via GET requests. When you request a transformed image URL, the transformation is applied dynamically on the first request and then cached for subsequent requests.
URL Pattern
https://media.vyso.io/flip:axis=horizontal/ASSET_ID.jpgExamples
Flip Horizontally (Left-Right Mirror)
curl -i GET https://media.vyso.io/flip:axis=horizontal/ASSET_ID.jpgFlip Vertically (Top-Bottom Mirror)
curl -i GET https://media.vyso.io/flip:axis=vertical/ASSET_ID.jpgFlip Both Axes (180° Rotation)
curl -i GET https://media.vyso.io/flip:axis=both/ASSET_ID.jpgFlip Horizontally with PNG
curl -i GET https://media.vyso.io/flip:axis=horizontal/ASSET_ID.pngFlip Vertically with WebP
curl -i GET https://media.vyso.io/flip:axis=vertical/ASSET_ID.webpOn the first request, you'll receive a X-Cache: MISS header while the transformation is applied and cached. Subsequent requests will return X-Cache: HIT.
Parameters
axisREQUIREDThe axis along which to flip the image. Accepted values:
horizontal- Flip left to right (mirror image horizontally)vertical- Flip top to bottom (mirror image vertically)both- Flip along both axes (equivalent to 180° rotation)
Response
The API returns the flipped image with the specified axis transformation applied. The response format depends on the format of the asset stored in the Vyso asset cloud.
Content-Type: Determined by the stored asset format (e.g., image/jpeg, image/png)