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

Examples

Small Thumbnail (100x100)

curl -i GET https://media.vyso.io/thumbnail:size=100/ASSET_ID.jpg

Standard Thumbnail (150x150)

curl -i GET https://media.vyso.io/thumbnail:size=150/ASSET_ID.jpg

Medium Thumbnail (200x200)

curl -i GET https://media.vyso.io/thumbnail:size=200/ASSET_ID.jpg

Large Thumbnail (300x300)

curl -i GET https://media.vyso.io/thumbnail:size=300/ASSET_ID.jpg

Extra Large Thumbnail with Quality

curl -i GET https://media.vyso.io/thumbnail:size=400:quality=90/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

sizeREQUIRED

Thumbnail size in pixels (square). Accepted values:

  • Range: 50 to 2000+
  • 100 - Small thumbnail
  • 150-200 - Standard sizes
  • 300-400 - Large thumbnails
qualityOPTIONAL

Thumbnail quality (for JPEG format). Accepted values:

  • Range: 1 to 100
  • 75 - Default quality
  • 85-95 - High quality
  • 60-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)