Hi,
I keep my images files within in a static folder, so
./MyProject/static/media/myimage.png
would be my path. In the template I make use of it like that:
<img src="{% static 'media/myimage.png' %} alt="my image">
It's explained here:
https://docs.djangoproject.com/en/3.0/howto/static-files/
also that you need to define your static folder in your settings
file:
STATIC_URL = '/static/'
and that you might need to run collectstatic first, if your DEBUG variable is set to false in your settings file.
Kind regards,
Antje
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4dd2997f-0063-4300-b075-404f99569f8e%40googlegroups.com.
--