{{# Responsive WebP image from an asset, cropped around the focal point set in the asset library. Params: img (asset, required), class, sizes, priority (true for the main hero image), shape: "landscape" (4:3, default) | "wide" (16:9) | "square" | "portrait" (4:5) | "natural" (no crop), alt (overrides the asset's alt text), fallback_alt (used when the asset has no alt text) #}} {{ if img }} {{ img_alt = alt ?: img:alt ?: fallback_alt ?: '' }} {{ shape = shape ?? 'landscape' }} {{ if shape == 'square' }}{{ h1 = 480 }}{{ h2 = 800 }}{{ h3 = 1200 }}{{ h4 = 1800 }} {{ elseif shape == 'portrait' }}{{ h1 = 600 }}{{ h2 = 1000 }}{{ h3 = 1500 }}{{ h4 = 2250 }} {{ elseif shape == 'wide' }}{{ h1 = 270 }}{{ h2 = 450 }}{{ h3 = 675 }}{{ h4 = 1013 }} {{ else }}{{ h1 = 360 }}{{ h2 = 600 }}{{ h3 = 900 }}{{ h4 = 1350 }}{{ /if }} {{ if shape == 'natural' }} {{ img_alt | entities }} {{ /if }}