I think I have a strange problem. I run a simple query that finds the largest image on the page. Here are some test data - all 32x32 images, but one up to 300x300.
<img src="app/assets/images/icons/blue.png" />
<img src="app/assets/images/icons/error.png"/>
<img src="app/assets/images/icons/info.png" height="300" width="300"/>
If I run a simple query:
$('img').each(function(){
console.log($(this).height());
});
I will receive 0,0,300- and not 32,32,300.
Can someone point me to the best way to determine the size of the image you are viewing?
Thank.
source
share