Pregunta

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.

¿Fue útil?

Solución

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!

Otros consejos

If oscar showed "img-not-found" image, then, maybe you didn't set the image for this product (probaly, this product is a variant product of a parent product) If oscar prompts error when access thumbnail image, then you should search Google for install PIL with JPEG support as suggest by @Hieu Nguyen

add this to your urls.py

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top