My image is dynamic, switching between portrait and landscape orientations. I want it to fill its parent div 100% while maintaining its aspect ratio.
I've seen similar questions asked, but I have some specific requirements:
- Avoid using background cover
- Avoid using object fit property
- Avoid using JavaScript
Is there a way to achieve this without compromising on my stipulations?