- Media API
- Transformations
- Resize
- thumbnail
thumbnail
The thumbnail transformation generates optimized square thumbnails from images. Automatically crops and resizes to a square format while maintaining visual quality and focus. Perfect for gallery displays, product previews, and avatar generation.
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/thumbnail:size=SIZE:quality=QUALITY/ASSET_ID.jpgExamples
Small Thumbnail (100x100)
curl -i GET https://media.vyso.io/thumbnail:size=100/ASSET_ID.jpgStandard Thumbnail (150x150)
curl -i GET https://media.vyso.io/thumbnail:size=150/ASSET_ID.jpgMedium Thumbnail (200x200)
curl -i GET https://media.vyso.io/thumbnail:size=200/ASSET_ID.jpgLarge Thumbnail (300x300)
curl -i GET https://media.vyso.io/thumbnail:size=300/ASSET_ID.jpgExtra Large Thumbnail with Quality
curl -i GET https://media.vyso.io/thumbnail:size=400:quality=90/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
sizeREQUIREDThumbnail size in pixels (square). Accepted values:
- Range: 50 to 2000+
100- Small thumbnail150-200- Standard sizes300-400- Large thumbnails
qualityOPTIONALThumbnail quality (for JPEG format). Accepted values:
- Range: 1 to 100
75- Default quality85-95- High quality60-70- Smaller file size, lower quality
Response
The API returns an optimized square thumbnail. The image is automatically cropped and resized to the specified square dimensions. 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)