0

I have a variable contain url my file image

m='media/abc2021x07x13/ch00002_01000000025099767142400187070_29H75756.jpg'
return render(request, 'new_template/view_image.html',{'form1': m})

and move to template to display

{% load static %}
<img src="{% static '{{form1}}' %}"
 width="1440" height="948" /

it can't display but when i try this, it can display

{% load static %}
<img src="{% static 'media/abc2021x07x13/ch00002_01000000025099767142400187070_29H75756.jpg' %}"
 width="1440" height="948" />
anh1301
  • 33
  • 3

1 Answers1

0

you don't need quotes and keys:

<img src="{% static form1 %}" width="1440" height="948" />