title: OSError: broken data stream when reading image file
body: <p>I am trying to read an image file using Image package of Keras. </p>
  
  <p>Here is my code.</p>
  
  <pre><code>from keras.preprocessing import image
  img_path = 'test/test_image.jpg'  # This is an image I took in my kitchen.
  img = image.load_img(img_path, target_size=(224, 224))
  </code></pre>
  
  <p>When I run the code, I get the following error.</p>
  
  <pre><code>anaconda3/lib/python3.5/site-packages/PIL/ImageFile.py in load(self)
      238         if not self.map and not LOAD_TRUNCATED_IMAGES and err_code &lt; 0:
      239             # still raised if decoder fails to return anything
  --&gt; 240             raise_ioerror(err_code)
      241 
      242         # post processing
  
  anaconda3/lib/python3.5/site-packages/PIL/ImageFile.py in raise_ioerror(error)
       57     if not message:
       58         message = "decoder error %d" % error
  ---&gt; 59     raise IOError(message + " when reading image file")
       60 
       61 
  
  OSError: broken data stream when reading image file
  </code></pre>
  
  <p>Please note, if I convert <code>test_image.jpg</code> to <code>test_image.png</code>, then the given code works perfectly. But I have several thousands of pictures and I can't convert all of them to png format. I tried several things after searching for solution in web but couldn't get rid of the problem.</p>
  
  <p>Any help would be appreciated!</p>