spread

The spread transformation randomly displaces pixels within a radius, creating a dispersal or scattering effect. Useful for artistic effects, creating texture variations, or simulating motion blur.

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/spread:radius=RADIUS/ASSET_ID.jpg

Examples

Light Spread Effect

curl -i GET https://media.vyso.io/spread:radius=1/ASSET_ID.jpg

Standard Spread

curl -i GET https://media.vyso.io/spread:radius=2/ASSET_ID.jpg

Medium Dispersal

curl -i GET https://media.vyso.io/spread:radius=3/ASSET_ID.jpg

Heavy Spread Effect

curl -i GET https://media.vyso.io/spread:radius=5/ASSET_ID.jpg

Extreme Dispersal

curl -i GET https://media.vyso.io/spread:radius=8/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

radiusREQUIRED

Radius of pixel displacement in pixels. Accepted values:

  • Range: 1.0 to 20.0+
  • 1.0 - Subtle dispersal
  • 2.0 - Light spread effect
  • 5.0 - Moderate dispersal
  • 10.0 - Heavy spread effect
  • Higher values create more pronounced scattering and texture variation

Response

The API returns the image with spread effect 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)