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.jpg

Examples

Subtle Swirl

curl -i GET https://media.vyso.io/swirl:degrees=30/ASSET_ID.jpg

Moderate Swirl

curl -i GET https://media.vyso.io/swirl:degrees=90/ASSET_ID.jpg

Strong Swirl

curl -i GET https://media.vyso.io/swirl:degrees=180/ASSET_ID.jpg

Dramatic Swirl

curl -i GET https://media.vyso.io/swirl:degrees=270/ASSET_ID.jpg

Full Rotation Swirl

curl -i GET https://media.vyso.io/swirl:degrees=360/ASSET_ID.jpg

On 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

degreesREQUIRED

Angle of swirl rotation in degrees. Accepted values:

  • Range: -360 to 360+
  • 0 - No swirl
  • 30-90 - Subtle swirl effect
  • 180 - Strong swirling distortion
  • 360 - 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)