Search code examples
djangoimagedjango-oscar

Django-oscar product images error


The product images get uploaded to the media folder correctly but the are not being requested when the product page is opened.The image container for the product image is just a div with no image src Also, the catalog images are working and are being displayed correctly. I am not able to figure out whats wrong. Please help.


Solution

  • As mentioned in the docs here

    Please ensure that pillow, a fork of the the Python Imaging Library (PIL), gets installed with JPEG support. Supported formats are printed when pillow is first installed. Instructions on how to get JPEG support are highly platform specific, but guides for PIL should work for pillow as well. Generally speaking, you need to ensure that libjpeg-dev is installed and found during installation.

    I guess you didn't install libjpeg-dev on your server at the time you installed Pillow. So you should:

    • pip uninstall pillow
    • apt-get install libjpeg-dev # or whatever similar in your server
    • pip install pillow # yes again

    Hope it helps!