I am having images in my media folder and I want to display them but Django is not displaying images other than static folder. In my setting
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR,'static'),]
MEDIA_ROOT = BASE_DIR
MEDIA_URL = '/media/'
In my urls.py after url pattern I added this
+ static(MEDIA_URL, document_root=MEDIA_ROOT)
In my templates
<img class="card-img-top" style="" src="{{result.object.thumbnail.url}}" alt=""></a>
<p>{{result.object.thumbnail.url}}</p>
It is showing the correct path but not showing the image, I am unable to figure out the problem. Thanks
MEDIA
folder placed in correct place in your project? is path valid? – Chiefirmedia
forder in the root of your project – Lemayzeur