Compression

Brotli and Gzip on text responses from the edge, and the image formats you can ask for on a delivery URL.

Two different things get called compression, and they work differently. Text responses are compressed for you, automatically, based on what the client says it accepts. Images are not — you ask for a format on the delivery URL and get exactly what you asked for.

Text responses

Points of presence compress text responses with Brotli or Gzip. Those are the two algorithms available; there is no third.

AlgorithmAccept-Encoding tokenNotes
BrotlibrPreferred. Better ratio on text, and every current browser supports it.
GzipgzipFallback for clients that do not advertise Brotli.

The client picks by advertising what it accepts, and the edge chooses the best one on that list:

Request
curl -sI -H 'Accept-Encoding: br, gzip' https://shop.example.com/ | grep -i content-encoding
Response
content-encoding: br

A client that sends no Accept-Encoding, or sends identity, gets the response uncompressed. Small responses and already-compressed content — images, video, archives — are not compressed again, because there is nothing to gain.

You do not enable this and there is nothing to configure. Most HTTP clients and every browser advertise br, gzip by default, so you get compression without doing anything; a client that sets Accept-Encoding: identity explicitly is opting out.

This happens at the edge. Responses from api.revenexx.com are answered by the origin, which does not compress. If transfer size on API responses matters to you — a bulk export, a large product list — request fewer fields or page more aggressively rather than relying on compression. See Pagination & filtering.

Images

Image compression is not applied by default. A file you upload is stored and served as you uploaded it — the original stays the source of truth. You get a smaller variant by asking for one on the delivery URL, and the result is cached at the point of presence per set of parameters — see Content delivery.

text
https://shop.example.com/cdn/photos/sunset.png?w=1800&fm=webp&q=90

fm selects the output format and q sets the quality:

Formatfm valueNotes
WebPwebpThe usual choice. Good ratio, universal browser support.
AVIFavifSmaller than WebP at the same quality, at the cost of more encode time.
JPEGjpgLossy fallback.
PNGpngLossless — use it when you need transparency without artefacts.

Request the format the client can actually display. If you are serving a <picture> element, ask for avif in one source and webp in the next and let the browser choose; if you are generating a URL for something that is not a browser, jpg is the safe answer.

The full parameter list — sizing, cropping, gravity, quality — is in Serve and transform images.

Was this page helpful?