Although I've been a bit slow to get on board with Responsive Design, I finally understand how it works. However, there's one specific issue that has stumped me - something I don't recall ever encountering in my 10 years of website development.
I have a large photo sized at 1920px X 1080px. I'm hesitant to resize it because I know users have larger screens for browsing. The current challenge I face is that the image is horizontally centered on the page (right below the main navigation at the top), and despite the rest of my site adjusting properly to different screen sizes, the photo loses its aspect ratio as the window size changes.
How can I ensure that the image maintains its aspect ratio as the site scales to various resolutions?
I would prefer a solution without using JavaScript since this particular site needs to be JavaScript-free. Otherwise, I would simply do some calculations and adjust the image size manually.