title: How do I get original image dimensions?
body: <p>I know the solution from this question: <a href="https://stackoverflow.com/questions/318630/get-real-image-width-and-height-with-javascript-in-safari-chrome">Get the real width and height of an image with JavaScript? (in Safari/Chrome)</a></p>
  
  <p>But I want to know if there's a simpler way to find the image's original dimensions if you are CERTAIN that the image has already been loaded.</p>
  
  <p>In my code, I already use:</p>
  
  <pre><code>$("&lt;img/&gt;").attr("src", $(img).attr("src")).load(function() {
      imageWidth = this.width;
      imageHeight = this.height;
  });
  </code></pre>
  
  <p>But this is useful when you aren't sure if the images are loaded or cached.</p>
  
  <p>Is there another method that might be significantly faster in execution when you don't have to worry about the images being cached or loaded?</p>
  
  <p>I want to detect the image's true dimensions on resizing the window <code>$(window).resize(function(){});</code>.</p>
  
  <p>Since this event fires really quickly, I want to make sure I use the most efficient method rather than the most careful one.</p>