title: How does Django determine if an uploaded image is valid?
body: <p>I'm trying to add images to my models in my Django app.</p>
  
  <p>models.py</p>
  
  <pre><code>class ImageMain(models.Model):
  """This is the Main Image of the product"""
      product = models.ForeignKey(Product)
      photo = models.ImageField(upload_to='products')
  </code></pre>
  
  <p>In development mode, every time I try to upload the image via Django admin, I keep getting:</p>
  
  <pre><code>Upload a valid image. The file you uploaded was either not an image or a corrupted image.
  </code></pre>
  
  <p>The jpg I'm trying to upload can be viewed with os X Preview so it would seem to be valid.</p>
  
  <p>It seems the problem is Python Imaging Library doesn't recognize it as an image. Why would that be happening with a valid image?</p>
  
  <p>PIL is installed, verified via the Django shell.</p>