How to define the image size inside div using jquery?

Help to determine the real dimensions of the photo in the div.

there are design
<div id="preview_img">
 <img class="img-responsive margin-center" src="example-foto.jpg" alt="Result">
</div>

width #preview_img 555px...

$('#preview_img img').width();
shows the size of the compressed pictures, which is just 555px, although the photo size 2100px ... how can you define original?
July 2nd 19 at 14:07
2 answers
July 2nd 19 at 14:09
Solution
on PureJS will not go ? codepen.io/nazares/pen/QGMdvW or so

var image = new Image();
image.src = $('img').attr("src");
alert('width:' + image.naturalWidth + 'and height:' + image.naturalHeight);
July 2nd 19 at 14:11
And move/copy the picture is not stylized image and then take its size?
then the div that copy, limited to the size of the browser. - Caroline.Herzog commented on July 2nd 19 at 14:14
: position: absolute; and will not be limited - candida_Upton commented on July 2nd 19 at 14:17

Find more questions by tags jQuery