Transformations
Resize, crop, rotate, apply effects and convert formats by adding parameters to the delivery URL.
A transformation is one URL segment of comma-separated key_value
parameters, placed before the public ID:
https://cdn.pixviro.com/{account}/{project}/c_fill,w_800,h_600,g_north,f_auto/products/red-shoe
It's generated on the first request and cached by the CDN afterwards; each new combination counts once as a transformation.
Playground
Try parameters and see the canonical URL (and the result, when a demo image is configured):
Parameters
| Param | Values | |
|---|---|---|
w_, h_ |
1 – your plan's maximum | Width and height in pixels |
c_ |
fit (default), fill, pad, scale, crop |
Crop mode, below |
g_ |
center (default), north, south, east, west, north_east, north_west, south_east, south_west |
Anchor for fill and pad |
b_ |
rgb, rrggbb, rrggbbaa, white, black, transparent |
Padding color for pad |
x_, y_ |
≥ 0 | Region offset for c_crop |
a_ |
multiples of 90 | Rotate clockwise |
fl_ |
hflip, vflip |
Mirror |
e_ |
see Effects | Effects |
q_ |
1–100, auto, auto:best, auto:good, auto:eco, auto:low |
Quality (default auto:good) |
f_ |
auto, jpg, png, webp, avif |
Output format (default: the original's) |
t_ |
preset name | Presets |
l_ |
watermark name | Watermarks |
pg_ |
page number | PDF pages |
f_auto serves AVIF or WebP to browsers that accept them (and JPEG/PNG to
the others) from one URL. An extension works as a format too:
products/red-shoe.webp is f_webp.
Crop modes
| Mode | Needs | Result |
|---|---|---|
fit |
w and/or h |
Scales to fit inside the box, keeps the aspect ratio. Never upscales. |
fill |
w and h |
Scales and crops to exactly w×h, anchored by g_ |
pad |
w and h |
Fits inside, then pads to exactly w×h with b_ |
scale |
w and h |
Stretches to exactly w×h |
crop |
w and h |
Cuts a w×h region at x_,y_ without scaling |
Aliases: limit → fit, cover → fill, contain → pad, stretch →
scale.
Effects
| Effect | Value | Default |
|---|---|---|
e_brightness:N |
−100 … 100 | required |
e_contrast:N |
−100 … 100 | required |
e_saturation:N |
−100 … 100 | required |
e_grayscale |
— | — |
e_blur[:N] |
1 … 2000 | 100 |
e_sharpen[:N] |
1 … 2000 | 100 |
Combine them: w_600,e_grayscale,e_blur:200. They apply after resizing, in
the order above.
Canonical URLs
Equivalent transformations are normalized to one canonical URL, so they
share a single cached image: parameters in a fixed order (t, pg, c, w, h, x, y, g, b, a, fl, e, l, q, f), defaults dropped (c_fit, g_center,
q_auto:good), and parameters without effect removed. A non-canonical
request answers 301 to the canonical one. The SDKs build canonical URLs
directly:
import { Delivery } from '@pixviro/sdk';
const cdn = new Delivery({ account: 'k3x9p2ab7q', project: 'shop' });
cdn.url('products/red-shoe', { transformation: { width: 800, height: 600, crop: 'fill', format: 'auto' } });
$cdn = new PixViro\Delivery('k3x9p2ab7q', 'shop');
$cdn->url('products/red-shoe', ['width' => 800, 'height' => 600, 'crop' => 'fill', 'format' => 'auto']);
cdn = Delivery("k3x9p2ab7q", "shop")
cdn.url("products/red-shoe", {"width": 800, "height": 600, "crop": "fill", "format": "auto"})
A query-string form is accepted too and redirected:
/products/red-shoe?w=800&h=600&crop=fill&format=auto.
Limits
Malformed or unknown parameters and out-of-range values return 400 —
nothing is guessed. Each asset can have a limited number of distinct
derivatives, and projects can restrict widths to an
allowlist, so crawlers and
attackers can't create unlimited variants.

