Image wont appear from media folder

Hey,

If I save some images with my form they are saved in the media folder in the correct path how it should be. If i want to show the images they wont appear, it’s confusing because yesterday it worked with the same code (i guess it was the same code lol)

so this is my code from the template to show the image:

<img src="/DivusX/StartSite/media/{{ image }}"/>

this is my path:

grafik

and my database says
grafik

so it should work, in other files I also have difficulties with the media folder maybe something is wrong there

here are my settings

MEDIA_URL = 'DivusX/StartSite/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'StartSite/media/')

and this in the urls of my app


urlpatterns = urlpatterns+static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT)

I also have a download button and if I hover it the path is shown (the button doesnt work because of the same thing as above) this is the shown path:

grafik

Thanks for your help

Making an assumption based on screenshot that your that site root for the web server is at /DivusX/StartSite/

Try

MEDIA_URL = "/media/"

and

<img src="/media/{{ image }}"/>

The file is not there. On your screenshot the file name is different.

so I did that but the Image still wont appear.

This is the new path where the image tries to get the picture
grafik

and this is the new path where the picture is saved:
grafik

btw ignore the different filenames thats not the reason why it doesnt work.

okay so I found the error, I had DEBUG=False and with my server nginx the files cant be served if debug is false and the files are in the normal path so I had to move them to my var/www and configure my sites-available with my new path and after reloading nginx the files were shown with debug false so everything works now. Thanks!