Image optimization (WebP)
Paradarum can convert images to WebP and resize them at the edge, shrinking payloads without touching your origin assets. It is enabled per property in the General tab and controlled by the image_optimization general setting.
Settings
{
"image_optimization": {
"enabled": true,
"quality": 80,
"max_width": 4000,
"max_height": 4000,
"only_if_smaller": true
}
}
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | — | Turns image optimization on. |
quality | int | 80 | WebP quality, clamped to 1–100. |
max_width | int | 4000 | Upper bound for output width. |
max_height | int | 4000 | Upper bound for output height. |
only_if_smaller | boolean | true | Only serve the optimized image if it's smaller than the original. |
Leaving only_if_smaller on (the default) means optimization can never make a response larger — already-optimal images are served untouched.
WebP requires the right Accept header
WebP is only served when the browser sends Accept: image/webp. Browsers that advertise WebP support get the converted image; everyone else receives the original format. This makes enabling WebP safe — there's no risk of serving an unsupported format.
Accept: image/webp
On-the-fly transforms
Beyond the global settings, you can transform individual images with query parameters:
| Param | Meaning | Example |
|---|---|---|
w | Target width in pixels. | w=800 |
h | Target height in pixels. | h=600 |
q | Quality (overrides the global default for this image). | q=75 |
format | Output format (for example webp). | format=webp |
fit | How to fit within the box (for example cover). | fit=cover |
Examples:
/image.jpg?w=800&h=600
/photo.png?format=webp&q=75
/hero.jpg?w=200&h=200&fit=cover
Resizes are still bounded by max_width / max_height (default 4000). A request larger than the configured maximum is capped at that limit.
Managed (live) properties
Image optimization is hidden for managed (live-stream-backed) properties — those properties are read-only and don't serve optimizable images through this path. See Live overview.
Related
- Browser caching & query strings — note that transform query params affect the URL; review how query strings factor into your cache key.
- Security headers (HSTS & more) — remember every general-settings save sends the full object.