title: Get the real width and height of an image with JavaScript? (in Safari/Chrome)
body: <p>I am creating a jQuery plugin.</p>
  
  <p>How do I get the real image width and height with Javascript in Safari?</p>
  
  <p>The following works with Firefox 3, IE7 and Opera 9:</p>
  
  <pre><code>var pic = $("img")
  
  // need to remove these in of case img-element has set width and height
  pic.removeAttr("width"); 
  pic.removeAttr("height");
  
  var pic_real_width = pic.width();
  var pic_real_height = pic.height();
  </code></pre>
  
  <p>But in Webkit browsers like Safari and Google Chrome values are 0.</p>