SyntaxFix
Write A Post
Hire A Developer
Questions
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()) })