wave

The wave transformation applies a sinusoidal wave distortion to an image, creating a ripple or undulating effect. Useful for artistic effects, creating liquid-like distortions, or generating abstract visual variations.

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/wave:amplitude=AMP:wavelength=WL/ASSET_ID.jpg

Examples

Subtle Wave Effect

curl -i GET https://media.vyso.io/wave:amplitude=2:wavelength=20/ASSET_ID.jpg

Standard Wave Distortion

curl -i GET https://media.vyso.io/wave:amplitude=5:wavelength=40/ASSET_ID.jpg

Pronounced Wave Pattern

curl -i GET https://media.vyso.io/wave:amplitude=8:wavelength=60/ASSET_ID.jpg

High Frequency Wave

curl -i GET https://media.vyso.io/wave:amplitude=4:wavelength=15/ASSET_ID.jpg

Extreme Wave Effect

curl -i GET https://media.vyso.io/wave:amplitude=12:wavelength=80/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

amplitudeREQUIRED

Wave height/displacement amount in pixels. Accepted values:

  • Range: 1.0 to 100.0+
  • 2.0 - Subtle wave
  • 5.0 - Standard distortion
  • 10.0 - Pronounced wave
  • Higher amplitude creates more extreme distortion
wavelengthREQUIRED

Distance between wave peaks in pixels. Accepted values:

  • Range: 5.0 to 500.0+
  • 15 - Tight, high-frequency waves
  • 40 - Standard wavelength
  • 80 - Loose, low-frequency waves
  • Smaller wavelength creates tighter, more frequent ripples

Response

The API returns the wave-distorted 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)