Documentation

Serving Images

Each image uploaded to MageCDN gets a URL in the following format:

://i.magecdn.com/:user-id/:image-uniq-id_:image-file-name

For example: https://i.magecdn.com/d2b508/f1e63d_image

Output Format (?f)

The f query parameter controls the output format of the image — whether it should be served as WebP, AVIF, PNG, etc., along with quality and encoding options.

Parameter Description Value
format Output format webp/gif/png/avif/jpeg/o
quality (q) Image quality (ignored for PNG) . 1-100
progressive (p) Use progressive mode to encode image? (ignored for GIF) t/f
loseless mode (l) Use loseless mode to encode image? (only supported for WebP) t/f

Example: https://i.magecdn.com/d2b508/f1e63d_image?f=webp,q.90,p.f,l.f

This URL will render image in webp format at 90% quality, with both loseless and progressive mode turned off.

Using ?f=o will serve the original image unmodified.

If f is not given, MageCDN will automatically select the most optimized format. See Optimization Defaults for details.

Optimization Defaults

If output format (f) is not specified, MageCDN automatically selects the most optimized settings to serve the image.

Input File Default Settings
PNG, JPEG AVIF, quality=60
WebP, GIF WebP, quality=80
SVG Serves original file

AVIF is the default format because it delivers excellent compression with virtually no visible quality loss. It’s so efficient that even at 20% quality, images remain surprisingly good compared to JPEG at similar settings.

Considering that it’s supported by all major browsers and OSes, there’s a little reason to not use it.

Transforms

You can also resize and crop images using query parameters. See Transforms for details.