Images

77 views
Skip to first unread message

Aliya Janmohamed

unread,
May 7, 2022, 6:37:32 PM5/7/22
to Django users
Hello, 

I cannot load my images, this is what shows:


Screen Shot 2022-05-06 at 10.10.06 PM.png

Arshad Noman

unread,
May 8, 2022, 3:34:32 AM5/8/22
to django...@googlegroups.com
First, you change the picture name and place it in the pictures folder like static or media folder then change the picture name in templates where you want the picture to be displayed

Virus-free. www.avast.com

On Sun, 8 May 2022 at 03:37, Aliya Janmohamed <aliya.jan...@gmail.com> wrote:
Hello, 

I cannot load my images, this is what shows:


--
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/2dc9f275-adcf-4a03-b8ed-db4aad8dfbc6n%40googlegroups.com.

Aliya Janmohamed

unread,
May 9, 2022, 11:15:24 AM5/9/22
to django...@googlegroups.com
Hi 

It is still displaying the same image as above. 

You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/M5ZOBHwScMA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B0oV2hu4SW1VJc0H%3DEfCnBsXLts0K8y_T_C-jjdpE5754r90g%40mail.gmail.com.

Arshad Noman

unread,
May 10, 2022, 8:58:56 AM5/10/22
to django...@googlegroups.com
You change the names of the pictures in the separate folder then copy them in a static folder then change the picture file names in the template folder then refresh then see pictures are new ones or not

Nicolas Passarini

unread,
May 13, 2022, 10:03:38 AM5/13/22
to Django users
how do you refer to the object in the template?

Boris Pérez

unread,
May 13, 2022, 10:25:43 PM5/13/22
to django...@googlegroups.com
If the images files are sotored in static:
{% load static %}

<img url='{% static /image_location/image_name.jpg  %}'......../>

Reply all
Reply to author
Forward
0 new messages