Are there any JavaScript or jQuery APIs or methods to get the dimensions of an image on the page?
Before using real image size you should load source image. If you use JQuery framework you can get real image size in simple way.
$("ImageID").load(function(){ console.log($(this).width() + "x" + $(this).height()) })