Javascript Image OnLoad event
<p>I know I can attach an event listener to a loading image so that it'll trigger when the image finishes loading like this:</p>

<pre><code>&lt;img id="mine" src="image.jpg" /&gt;

&lt;script&gt;
$('#mine').load(function() {
  console.log($(this).height()); //The image's height
  console.log($(this).width()); //The image's width
})
&lt;/script&gt;
</code></pre>

<p>But my browser knows how big the image is going to be as soon as the header is loaded - can I tap into that event, so that as soon as the browser knows the image's size I can resize elements on my page?</p>

<p>Thanks!</p>
