Is there a css-only solution to scale an image into a bounding box (keeping aspect-ratio)? This works if the image is bigger than the container:
img { max-
Today, just say object-fit: contain. Support is everything but IE: http://caniuse.com/#feat=object-fit