Presets & watermarks
Name your transformations, change them in one place, and brand images with versioned watermarks.
Presets
A preset is a named transformation in a project: thumb →
c_fill,w_300,h_300,g_north. Use it in URLs with t_:
| URL | |
|---|---|
t_thumb/products/red-shoe |
The preset's current version |
t_thumb@2/products/red-shoe |
Version 2, forever (cacheable as immutable) |
t_thumb,f_webp/products/red-shoe |
Preset plus overrides: explicit parameters win |
Editing a preset creates a new version: t_thumb URLs follow it within a
minute, t_thumb@n URLs never change.
curl https://pixviro.com/v1/presets -H "Authorization: Bearer $PIXVIRO_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"thumb","transformation":"c_fill,w_300,h_300,g_north"}'
await pixviro.presets.create({ name: 'thumb', transformation: 'c_fill,w_300,h_300,g_north' });
await pixviro.presets.update('thumb', { transformation: 'c_fill,w_320,h_320' }); // new version
$pixviro->presets->create(['name' => 'thumb', 'transformation' => 'c_fill,w_300,h_300,g_north']);
pixviro.presets.create(name="thumb", transformation="c_fill,w_300,h_300,g_north")
Managing presets needs the presets:write key permission. The number of
presets depends on your plan.
Watermarks
Named, versioned overlays (Starter and up): an image (copied from an asset when saved) or a text. Size, opacity, position and margin are relative to the output, so a watermark looks the same at every size.
curl https://pixviro.com/v1/watermarks -H "Authorization: Bearer $PIXVIRO_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"logo","kind":"image","source":"brand/logo","scale":20,"opacity":70,"gravity":"south_east","margin":3}'
| Field | |
|---|---|
kind |
image (with source, a public ID) or text (with text, color) |
scale |
Width (image) or font size (text), % of the output width (default 20) |
opacity |
0–100 (default 70) |
gravity |
One of the 9 positions (default south_east) |
margin |
% of the output width (default 3) |
Use it with l_, alone or in a preset:
https://cdn.pixviro.com/{account}/{project}/w_1200,l_logo/products/red-shoe
https://cdn.pixviro.com/{account}/{project}/v3/w_1200,l_logo@2/products/red-shoe
Watermarks are applied after resizing and effects, so effects never alter them.

