I am able to load images to the specific path using Imagefield but not able to display those images in my html templates.
my settings.py :
STATIC_ROOT = "/app/static/"
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join( BASE_DIR,'app','static'),
)
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
files are loading successfully @ ./media/
here is my urlpattern setting: if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
{% for service in services %}
<div class="col-md-4 animate-box">
<div class="feature-left">
<span class="icon">
<img src="{{ service.icon.url }}" alt=""/>
</span>
<div class="feature-copy">
<h3>{{service.name}}</h3>
<p>{{ service.text }}</p>
<p><a href="#">Learn More <i class="icon-arrow-right22"></i></a></p>
</div>
</div>
</div>
{% endfor %}
Not Found: /icon/6.png
Not Found: /icon/blog-1.jpg
Not Found: /media/6_qjtYB6t.png
Not Found: /blog/blog-3.jpg