How do I get natural dimensions of an image using JavaScript or jQuery?
You could use naturalWidth and naturalHeight, these properties contain the actual, non-modified width and height of the image, but you have to wait until the image has loaded to get them var img = document.getElementById(‘draggable’); img.onload = function() { var width = img.naturalWidth; var height = img.naturalHeight; } This is only supported from IE9 and … Read more