I am working with images, and I ran across a problem with aspect ratios.
You can set the container to display: flex and align-items: center (other align-items values work too). Instead of align-items you can also set align-self on the image itself.
display: flex
align-items: center
align-items
align-self