The aspect ratio of an image can be set using the “aspect-ratio” property and setting a value such as “16 / 9” i.e. “aspect-ratio: 16/9;”
The property can be paired with “object-fit: cover;” to ensure the image takes up all the available space. If the image needs to be a fixed size and cropping may be an issue, “object-fit: contain;” would be more appropriate.