How to get image attribute (height, width, alt, title) when knowning image src.
Create an img object and give us your image src, then once it has loaded get the image attributes that you need from it.
If you need to work with one that's already on the page, but you don't know where it is, search for all of the img tags on the page than filter them for the one that has a matching src.
Yep. If you're using jquery you can get it like this:
var image_src = "foo.png"
$( 'img[src="' + image_src + '"]' );
This topic is now closed. New replies are no longer allowed.