title: Can't retrieve image width in Safari using Javascript but works fine in Chrome
body: <p>I have the following code</p>
  
  <pre><code>img = document.getElementById('image'); // which is an &lt;img&gt; element
  
  if (img.width &gt; 0) {
      // I get here in Chrome, width is correct
  } else {
      // I get here in Safari, width is 0
  }
  </code></pre>
  
  <p>Why is the width property 0 in Safari and how can I solve this?</p>