Hard-coding static asset urls is brittle because the place the files are stored depends on the `STATICFILES_STORAGE` used - so if in prod the storage backend uploads to S3 or even renames the file then this hard-coded URL will break.
Using "{% static ... %}" solves that as it knows exactly where the files are stored.
Read more- | <img src="/static/logo.png" /> |
+ | {% load static %} |
+ | <img src="{% static 'logo.png' %}" /> |