title: PIL: image from url, cannot identify image file
body: <p>I am trying to access an image from a url:</p>
  
  <p><a href="http://www.lifeasastrawberry.com/wp-content/uploads/2013/04/IMG_1191-1024x682.jpg" rel="nofollow">http://www.lifeasastrawberry.com/wp-content/uploads/2013/04/IMG_1191-1024x682.jpg</a></p>
  
  <p>However, it fails with IOError("cannot identify image file") in the last step. Not sure what is going on or how to fix it. It has worked with many other url images.</p>
  
  <pre><code>    opener = urllib2.build_opener()
      opener.addheaders = [('User-agent', 'Mozilla/5.0')]
      opener.addheaders = [('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')]
      opener.addheaders = [('Accept-Encoding', 'gzip,deflate,sdch')]
  
      response = opener.open(image_url,None,5)
      img_file = cStringIO.StringIO(response.read())  
  
      image = Image.open(img_file)
  </code></pre>
  
  <p>this url also fails:</p>
  
  <p><a href="http://www.canadianliving.com/img/photos/biz/Greek-Yogurt-Ceaser-Salad-Dressi1365783448.jpg" rel="nofollow">http://www.canadianliving.com/img/photos/biz/Greek-Yogurt-Ceaser-Salad-Dressi1365783448.jpg</a></p>