Aspect Ratio

Reserves a media element's aspect ratio before it loads, so the page does not jump. An unknown ratio falls back to 16/9 instead of collapsing the box.

16/9 and 1/1

16/9
1/1
@components.AspectRatio(components.AspectRatioProps{Ratio: "16/9"}) { <img src="..." alt="..."> }