title: How to get the size of an image in IMG html attribute
body: <p>I saw this code to get the size<code>(KB, MB)</code> of an image. But this code is getting the data from the button after change. Can this code apply to my question?. Or is there any other way to directly get the size of the image using javascript?.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function () {
     $("#btnClick").change(function (e){
        var a = e.target.files[0];
        alert(parseFloat(a.size / 1024).toFixed(2) + " KB.");
     });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input type="file" id ="btnClick"/&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>EDIT</strong>
  As <code>nnnnn</code> said. I have an <code>IMG (eg. &lt; img src="someimg.jpg"&gt;)</code> I want to get the size of this picture. How do I get it?. As my example above it store the size in the button and retrieve it.</p>