bunny.net × Astro

Bunny Optimizer

Images

Bunny Optimizer resizes and re-encodes at the edge, from query parameters on the image's own URL.

A generated gradient, resized by Bunny Optimizer

Look at this image's srcset. Each entry is the same file with a different width, and nothing was resized while the site was built.

Modern formats

The same image, offered as AVIF and WebP

Without the component

Optimizer works on any URL the pull zone serves, so a plain <img> can use it too:

A public image, resized by query parameters
<img src="/square.png?width=320&format=webp&quality=80" />

Turn it on first

Bunny Optimizer is a paid pull zone feature, so the adapter never enables it for you. Without it the parameters are ignored, and the original image is served.