Looking to display a dynamic list of images with varying sizes and orientations - some landscape, some portrait.
The challenge is that the landscape images should fill 100% width of their parent container, while the portrait images should fill 100% height.
I've managed to achieve this by determining the image orientation server-side and applying the appropriate class for either full-width or full-height display.
Is there an alternative method to maintain aspect ratio without relying on object fit or background images?