I have a parent element that is animating its shape from landscape to portrait and vice versa.
The parent element contains an image, which as its parent changes shape, is getting distorted.
I want the image to maintain correct proportions, staying in the middle of the parent while being cutoff at the edges for example.
This is similar to how an image maintains proportions using object-fit, but I can’t use that here because the parent is animated using transforms to avoid layout thrashing.
A simplified example of my problem => https://codepen.io/alexpi/pen/wbeXVX