Forums

Media files not loading

I can't get the media cover art jpg's to load. Works ok on my Mac. Have tried stair file mapping on the Web App page in both the following:

/static/ <my abs project dir>/static/media/product/ and /media/ <my abs project dir>media/product/ and no mapping for media files.

My database image file stores items in the format: uploads/product/<isbn#>.jpg

Images are shown at the top of the response page to the home page after entering an ISBN (and on successive cart and checkout pages.) The page source looks like this:

<ul id="product-images-large" class="list-unstyled list-inline"><li id="image-2-large"><a class="product-image-large" href="/static/media/uploads/product/0135163048.jpg"><img alt="Cover image" src="/static/media/uploads/product/.thumbnails/0135163048.jpg/0135163048-0x300.jpg" class="img-thumbnail img-responsive col-xs-12"></a></li></ul>

And the HTML source file for the page is: <project_dir>/theme/templates/product.html

MEDIA_URL in settings.py is STATIC_URL + "media/"

See our help page for debugging issues with static files: http://help.pythonanywhere.com/pages/DebuggingStaticFiles/