title: imghdr / python - Can't detec type of some images (image extension)
body: <p>I'm downloading a lot of images from imgur.com with a Python script and since I have all the links in the format <code>http://imgur.com/{id}</code> I have to force download them by replacing the original url with <code>http://i.imgur.com/{id}.gif</code>, then saving all the images without extension. (I know that there is an Imgur's API but I can't use it since it have limitations for this kind of job)</p>
  
  <p>Now after downoading images, I want to use imghdr module to determine the original extension of the image:</p>
  
  <pre><code>&gt;&gt;&gt; import imghdr
  &gt;&gt;&gt; imghdr.what('/images/GrEdc')
  'gif'
  </code></pre>
  
  <p>The problem is that this works with a success rate of 80%, the remaining 20% are all identified as <code>'None'</code> and checking some of them I noticed that they are most likely all .jpg images. </p>
  
  <p>Why imghdr can't detect the format? I'm able to open theese images with Ubuntu's default image viewer even without extension, so I don't think they are corrupted.</p>