[Answered ]-Using Django template tag in <img> tag

2👍

Try using:

<ul>
    {% for cer in c_list %}
      <li><img src="{% static cer %}"/></li>
    {% endfor %}
</ul>
👤avenet

0👍

i think you need also .url from Certificate‘s Image field:

<ul>
{% for cer in c_list %}
  <li><img src="{% static cer.image.url %}"/></li>
{% endfor %}
</ul>

if the image field is called image

Leave a comment