I just want to know, can I detect attributes of an image before displaying it on the web? In my case, I have a thousand photos. I want to display them on my web page but some photos have a different orientation (like Landscape and Portrait).
Can I detect the width and height of the image before it is displayed on my web page?
Maybe using JavaScript like:
If height>width than rotate
else just display.
Is there any JavaScript function for doing that? Just for getting the attribute not displaying it. Is there a trick?
