solarize

The solarize transformation applies a solarization effect by inverting pixels above a threshold brightness value, creating a surreal, partially negative appearance. Perfect for artistic photography, creating unique visual effects, or achieving a vintage film-like aesthetic.

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/solarize:threshold=VALUE/ASSET_ID.jpg

Examples

Light Solarization

curl -i GET https://media.vyso.io/solarize:threshold=50/ASSET_ID.jpg

Medium Solarization

curl -i GET https://media.vyso.io/solarize:threshold=128/ASSET_ID.jpg

Standard Solarization

curl -i GET https://media.vyso.io/solarize/ASSET_ID.jpg

High Solarization

curl -i GET https://media.vyso.io/solarize:threshold=200/ASSET_ID.jpg

Extreme Solarization

curl -i GET https://media.vyso.io/solarize:threshold=240/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

thresholdOPTIONAL

Brightness threshold for inverting pixels. Accepted values:

  • Range: 0 to 255
  • 128 - Standard solarization (default, mid-brightness)
  • 50-100 - More inversion (darker areas inverted)
  • 200-255 - Less inversion (only brightest areas inverted)
  • Pixels brighter than this value get inverted

Response

The API returns a solarized version of the image where pixels above the threshold brightness are inverted, creating a unique surreal 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)