- Media API
- Transformations
- Effect
- spread
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.jpgExamples
Light Spread Effect
curl -i GET https://media.vyso.io/spread:radius=1/ASSET_ID.jpgStandard Spread
curl -i GET https://media.vyso.io/spread:radius=2/ASSET_ID.jpgMedium Dispersal
curl -i GET https://media.vyso.io/spread:radius=3/ASSET_ID.jpgHeavy Spread Effect
curl -i GET https://media.vyso.io/spread:radius=5/ASSET_ID.jpgExtreme Dispersal
curl -i GET https://media.vyso.io/spread:radius=8/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
radiusREQUIREDRadius of pixel displacement in pixels. Accepted values:
- Range: 1.0 to 20.0+
1.0- Subtle dispersal2.0- Light spread effect5.0- Moderate dispersal10.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)