Images have the naturalWidth and naturalHeight , which contain the actual, unmodified width and height of the image, i.e. real image sizes, not what CSS sets.
It would remain to wait for the image to load, although
$('#idOfMyimg').on('load', function() { var height = this.naturalHeight, width = this.naturalWidth; });
Another option is to create a new image with the same file as the source, and get dimensions from it if it is never added to the DOM, and not external styles will affect it
var img = new Image(); img.onload = function() { var height = this.height, width = this.width; } img.src = $('#idOfMyimg').attr('src');
Fiddle
adeneo
source share