posterize

The posterize transformation reduces the number of color levels in an image, creating a bold, graphic poster-like effect with limited color palette. Perfect for creating artistic posters, vintage effects, or reducing image complexity.

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/posterize:levels=LEVELS/ASSET_ID.jpg

Examples

Subtle Posterization (6 Levels)

curl -i GET https://media.vyso.io/posterize:levels=6/ASSET_ID.jpg

Medium Posterization (4 Levels)

curl -i GET https://media.vyso.io/posterize:levels=4/ASSET_ID.jpg

Strong Posterization (3 Levels)

curl -i GET https://media.vyso.io/posterize:levels=3/ASSET_ID.jpg

Extreme Posterization (2 Levels)

curl -i GET https://media.vyso.io/posterize:levels=2/ASSET_ID.jpg

Very Heavy Reduction (2-Bit)

curl -i GET https://media.vyso.io/posterize:levels=1/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

levelsREQUIRED

Number of color levels per channel. Accepted values:

  • Range: 1 to 8+
  • 8 - Subtle effect, maintains detail
  • 6 - Moderate posterization
  • 3-4 - Strong poster effect
  • 1-2 - Extreme color reduction
  • Lower values create more dramatic, graphic posters

Response

The API returns a posterized version of the image with reduced color palette and bold blocks of color. 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)