{meta.width} × {meta.height} · {meta.format}
Each example references a size by name. getImageUrl is synchronous — it only signs a URL; the fetch, decode, and transform happen in the endpoint on the browser's
request, cached on disk so later requests skip the work. getImage runs the same size inline when you need the bytes server-side.
getImage() returns the transformed bytes plus dimensions and format:
{meta.width} × {meta.height} · {meta.format}
The same source into a 240×240 box. fit: 'fill' stretches to the exact box; fit: 'inside' preserves aspect ratio and fits within it:
fit: 'fill'fit: 'inside'A size's rotate turns the image clockwise in multiples of 90:
rotate: 90rotate: 180rotate: 270flip: true mirrors vertically (about the x-axis); flop: true mirrors horizontally:
flipflopA size's modulate adjusts brightness and saturation (1 = unchanged):
saturation: 0brightness: 1.5saturation: 2The same 300px image through three format sizes, with byte sizes from getImage(). Bun.Image can also encode avif:
{label} · {kb(size)}