JavaScript: Determine image type
<p>I have an image:</p>

<pre><code>&lt;img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQATogyQfWKBYKa-13DRJrXGruHezGarydPB-yDOw-rako27rV4"&gt;​
</code></pre>

<p>which displays as:</p>

<p><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQATogyQfWKBYKa-13DRJrXGruHezGarydPB-yDOw-rako27rV4">​</p>

<p>The name of the image in the link exhibits no obvious extension. How can I use JavaScript to figure out what kind of image this is?</p>
