Skip to main content

Reference

Native image formats​

Actual support depends on the installed PHP extension and its codecs.

FormatGDImagick
JPEG, PNG, GIF, WebP, AVIFRead and writeRead and write
BMPReadRead
Single-page TIFFRead
Still HEIC / HEIFRead with Fileinfo and an HEIF decoder
Still JPEG XLRead with a JPEG XL decoder

Animation transforms for GIF and WebP use Imagick. A missing decoder or unsupported transform can return the original URL. Supported outputs are jpg, jpeg, png, gif, webp, avif and original. format('original') preserves the extension when the driver can write it.

Builder methods​

MethodPurpose
collections(), documentId(), itemType(), blockName(), lang(), get()Read gallery entries for a parent, block and locale
file(), getFile()Open an image source and resolve the resulting URL
resize(), fit(), crop()Set target dimensions or a crop
manualCrop(), focalCrop()Select a region using source coordinates
format(), quality(), optimize()Select the encoder, quality and optimization
watermark(), sharpen()Add a watermark or adjust sharpness

Find worked examples in the image manipulation guides. See configuration for permissions, supported link schemes and cache locations.