Is there a way to showcase an image on the entire screen without distorting it, while maintaining its aspect ratio in either HTML or Javascript?
The desired outcome is for the image to be centered and:
- Have a height of 100% and a width of x% (where "x" is less than or equal to 100%)
or
- Have a height of y% and a width of 100% (where "y" is less than or equal to 100%)
This type of display would be ideal for a full-screen image viewer web application.