Transforms
Transform Parameters
All available image transformation parameters.
Transform Parameters
Transform images on the fly by adding query parameters to the delivery URL.
https://your-vault.imgbt.com/path/to/image.jpg?w=800&h=600&fit=cover&format=webp&q=85Dimensions
| Parameter | Type | Range | Description |
|---|---|---|---|
w | integer | 1–8192 | Target width in pixels |
h | integer | 1–8192 | Target height in pixels |
dpr | number | 1–3 | Device pixel ratio multiplier |
The effective dimensions are w x dpr and h x dpr. The total pixel area must not exceed 25,000,000 pixels.
Resizing
| Parameter | Values | Description |
|---|---|---|
fit | cover, contain, fill, inside, outside | How the image fits the target dimensions |
cover— Resize to fill the dimensions, cropping if necessarycontain— Resize to fit within dimensions, preserving aspect ratiofill— Stretch to exactly fill dimensions (may distort)inside— Likecontain, but never enlargeoutside— Likecover, but never shrink
Format & Quality
| Parameter | Alias | Values | Description |
|---|---|---|---|
format | f | webp, avif, png, jpg, gif | Output format |
quality | q | 1–100 | Compression quality |
Effects
| Parameter | Alias | Type | Range | Description |
|---|---|---|---|---|
blur | — | integer | 1–100 | Gaussian blur intensity |
sharpen | — | integer | 1–100 | Sharpening intensity |
rotate | rt | integer | 0, 90, 180, 270 | Rotation in degrees |
flip | — | string | h, v | Flip horizontally or vertically |
grayscale | — | boolean | true, false | Convert to grayscale |
Cropping
| Parameter | Alias | Values | Description |
|---|---|---|---|
crop | — | face, auto, entropy, attention | Smart crop mode |
gravity | g | See below | Crop anchor point |
Gravity Values
Compass directions: center, north, south, east, west, northeast, northwest, southeast, southwest
Smart values: face, auto
Color & Decoration
| Parameter | Format | Description |
|---|---|---|
bg | 6-char hex (e.g., ff0000) | Background color for transparent images |
border | {width},{color} (e.g., 5,ff0000) | Add a border |
radius | integer or max | Corner radius (use max for circle) |
Examples
Thumbnail
?w=200&h=200&fit=cover&format=webp&q=80Social Media Card
?w=1200&h=630&fit=cover&format=jpg&q=90Retina Avatar
?w=64&h=64&fit=cover&crop=face&dpr=2&format=webpBlurred Background
?w=1920&h=1080&fit=cover&blur=50&q=60&format=webp