Skip to main content

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
}
}
FieldTypeDefaultNotes
enabledbooleanTurns image optimization on.
qualityint80WebP quality, clamped to 1100.
max_widthint4000Upper bound for output width.
max_heightint4000Upper bound for output height.
only_if_smallerbooleantrueOnly serve the optimized image if it's smaller than the original.
tip

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:

ParamMeaningExample
wTarget width in pixels.w=800
hTarget height in pixels.h=600
qQuality (overrides the global default for this image).q=75
formatOutput format (for example webp).format=webp
fitHow 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
info

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.