frame

The frame transformation adds a decorative border frame around an image with specified width and color. Perfect for creating presentation-ready images, framing artwork, or adding visual emphasis.

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/frame:width=WIDTH:color=COLOR/ASSET_ID.jpg

Examples

Simple Frame (10px)

curl -i GET https://media.vyso.io/frame:width=10/ASSET_ID.jpg

Standard Frame with Color

curl -i GET https://media.vyso.io/frame:width=20:color=000000/ASSET_ID.jpg

Decorative Gold Frame

curl -i GET https://media.vyso.io/frame:width=25:color=FFD700/ASSET_ID.jpg

Thick Picture Frame

curl -i GET https://media.vyso.io/frame:width=50:color=8B4513/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

widthREQUIRED

Frame border width in pixels. Accepted values:

  • Range: 1 to 200+
  • 10 - Thin frame
  • 20 - Standard frame
  • 50 - Thick decorative frame
colorOPTIONAL

Frame color (hex format without #). Accepted values:

  • 000000 - Black (default)
  • ffffff - White
  • FFD700 - Gold
  • 8B4513 - Brown (wood)
  • Any 6-digit hex color code

Response

The API returns the framed image. 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)