79119984

Date: 2024-10-23 23:32:43
Score: 0.5
Natty:
Report link

the correct syntax to concatenate the static path with the dynamic image name. Change your template code to:

<img src="{% static 'blog/images/' %}{{ post.image }}" alt="Mountain" />

Or if post.image is a Django ImageField or FileField you should use:

<img src="{{ post.image.url }}" alt="Mountain" />
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Nova