Aspect ratio

In some cases, aspect ratio sizing may not be supported by the embed. This component will only work with ones that do, like YouTube.

EuiAspectRatio provides a way to responsively resize a single block level child element to a specificied ratio. This is useful for things like YouTube iframes or other embeds that initially have a fixed size. If you need something similar for images, take a look at CSS's object-fit property.

16x9 aspect

4x3 aspect

220x150 with a maxWidth set to 500