Compression & media
Guide
Compression, minification & images
Shrink responses on the fly with Brotli/Gzip/Zstd, HTML minification and WebP transforms.
Three independent transforms reduce the bytes you serve, cutting bandwidth and speeding up first paint:
- Compression —
enable_compressionwithcompression_flags(gzip, deflate, br, zstd). - Minification —
enable_minificationwithminification_flags(html). - WebP —
enable_webp_transformationre-encodes images to WebP afterwebp_transformation_min_ageseconds.
⚡Compounding wins
Compression and minification stack: minify HTML to remove whitespace, then compress the result. On text-heavy pages the combined saving is routinely 70–90% of the original transfer size.