Skip to content

v0.3.0

@simon-mundy simon-mundy tagged this 15 May 05:48
Variants gain an optional `formats` array (e.g. ['avif', 'webp']) and `quality`
hint. When set, the S3 adapter materialises one sibling object per format per
variant (`<base>__<variant>.<format>`) so consumers can build <picture>
markup. When omitted, the legacy behaviour kicks in: variants take the source
file's extension.

ImageResizer now passes `-background none` so source transparency survives
into PNG/AVIF/WebP variants. The quality flag is forwarded to ImageMagick's
encoder, which picks defaults appropriate to each output format.

The variant URL builder, deleter, and renamer in the S3 adapter all loop over
formats so cleanups stay tidy. CloudflareImages is unaffected — it resolves
transforms at URL time and ignores per-variant format hints.
Assets 2
Loading