- Media API
- Transformations
- Effect
- pixelate
pixelate
The pixelate transformation creates a pixelated or mosaic effect by dividing the image into blocks of colored squares. Perfect for privacy protection, artistic effects, retro gaming aesthetics, or creating eye-catching visual elements. Control the pixel size for subtle or dramatic effects.
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/pixelate:size=PIXEL_SIZE/ASSET_ID.jpgExamples
Subtle Pixelation (8px)
curl -i GET https://media.vyso.io/pixelate:size=8/ASSET_ID.jpgMedium Pixelation (16px)
curl -i GET https://media.vyso.io/pixelate:size=16/ASSET_ID.jpgStrong Pixelation (32px)
curl -i GET https://media.vyso.io/pixelate:size=32/ASSET_ID.jpgHeavy Pixelation (64px)
curl -i GET https://media.vyso.io/pixelate:size=64/ASSET_ID.jpgExtreme Pixelation (128px)
curl -i GET https://media.vyso.io/pixelate:size=128/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
sizeREQUIREDSize of each pixel block in pixels. Accepted values:
- Range: 1 to 500+
1- Minimal effect (almost no change)8-16- Subtle mosaic effect32-64- Strong pixelation128+- Extreme pixelation/blur effect
Response
The API returns a pixelated version of the image with the specified block size. Larger values create a more dramatic pixelated effect. 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)