I've read multiple posts on this, and even found a plugin (http://dreamerslab.com/blog/en/get-hidden-elements-width-and-height-with-jquery/), but still didn't fix my problem.
I need to get the actual height and width of an image, before it's displayed on the front end.
I've tried so many things, I really don't want to show it, then figure it out, then hide it again and then later show it. It doesn't seem practical, I was wondering if anyone has found any solutions?
I've tried:
$('img').get(0).clientWidth;
$('img').get(0).naturalWidth;
$('img').get(0).width;
$('img').get(0).offsetWidth;
$('img').get(0).width();
No luck with either of these, I did try the above with height as well.
The image DOESN"T have the height and width attributes set manually.
Shannon