Image Parameters
This page documents the query parameters GET /c/img/*path accepts, their defaults, and normalization rules.
Parameters
Each parameter has a short and a long name; utils.GetQuery takes the first non-empty one:
| Short | Long | Default | Description |
|---|---|---|---|
o |
origin |
0 |
1 returns the original file and ignores all transform parameters |
s |
size |
— | Short-edge length (px); takes precedence over w / h |
w |
width |
— | Width (px) |
h |
height |
— | Height (px) |
q |
quality |
75 (50 for AVIF) |
Output quality, clamped to 0–100 |
t |
type |
webp |
Output format |
b |
blur |
0 |
Gaussian blur sigma, clamped to 0–100 |
B |
bright |
1 |
Brightness multiplier |
d |
dark |
— | 1 or dark switches error responses to the dark placeholder |
b and B are case-sensitive: blur and brightness respectively.
Format and Quality
t value |
Output | Content-Type | Quality |
|---|---|---|---|
webp, empty, invalid |
WebP | image/webp |
q, default 75 |
jpg, jpeg |
JPEG (jpeg normalized to jpg) |
image/jpeg |
q, default 75 |
avif |
AVIF | image/avif |
q, default 50 |
png |
PNG | image/png |
Not applied |
Unparseable q and b fall back to their defaults; an unparseable B fails the transform and returns the placeholder.
Examples
# Short edge 480 px, AVIF, quality 60
curl -o a.avif "http://localhost:8080/c/img/blog/photo.jpg?s=480&t=avif&q=60"
# Width 800 px, blur 10, brightness 0.8, dark placeholder on failure
curl -o b.webp "http://localhost:8080/c/img/blog/photo.jpg?width=800&blur=10&bright=0.8&dark=1"
# Original file
curl -o c.jpg "http://localhost:8080/c/img/blog/photo.jpg?o=1"
See Sizing Rules for how size parameters map to output dimensions and Image Pipeline for processing order.