@mattgperry@shadeed9 My take on this was to wrap images with div and compare its aspect ratio with the one from image inside, if the image is larger than wrapper set height: 100% width: auto, otherwise do the opposite
https://t.co/gxeOa8FVjP
Sorry for the clunky code, I was just experimenting
@mattgperry@shadeed9 Thanks for this! This is what I was talking about on Josh Cormeau's thread, do you plan to add a simpler way to do this with the framer-motion api? That would be really nice!
@mattgperry@JoshWComeau@shadeed9 Would it be possible to do layout transition between two images with different aspect ratios with object-fit: cover behaviour? I was trying do do this with framer-motion recently but not possible at the moment, right? :)