- Media API
- Transformations
- Effect
- swirl
swirl
The swirl transformation creates a swirling distortion effect by rotating pixels around the center of the image. Perfect for creating playful, surreal effects or adding dynamic visual interest. Control the rotation angle to create custom distortions.
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/swirl:degrees=ANGLE/ASSET_ID.jpgExamples
Subtle Swirl
curl -i GET https://media.vyso.io/swirl:degrees=30/ASSET_ID.jpgModerate Swirl
curl -i GET https://media.vyso.io/swirl:degrees=90/ASSET_ID.jpgStrong Swirl
curl -i GET https://media.vyso.io/swirl:degrees=180/ASSET_ID.jpgDramatic Swirl
curl -i GET https://media.vyso.io/swirl:degrees=270/ASSET_ID.jpgFull Rotation Swirl
curl -i GET https://media.vyso.io/swirl:degrees=360/ASSET_ID.jpgOn 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
degreesREQUIREDAngle of swirl rotation in degrees. Accepted values:
- Range: -360 to 360+
0- No swirl30-90- Subtle swirl effect180- Strong swirling distortion360- Full rotation swirl- Negative values swirl in opposite direction
Response
The API returns a swirled version of the image with pixels rotated around the center in a spiral pattern. 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)