title: Trying to find the true width of an image using jquery
body: <p>I'm trying to find the "true" width of images using the following code:</p>
  
  <pre><code>$(document).ready(function( ) {
     $('.pageContent img').each(function(){
          var theImage = new Image();
          theImage.src = $(this).attr("src");
          var imageWidth = theImage.width;
          console.log(imageWidth);
     }
  }
  </code></pre>
  
  <p>The problem I'm getting is each time I reload the page the results are different. Some imageWidth are 0. Any idea why this would happen please?</p>
  
  <p>This is using Jquery 1.9.1 and Chrome.</p>
  
  <p>Thanks.</p>