Media files not showing when debug is false

My media files are not showing when i try to access them with debug false and using python manage.py runserver

See the insecure parameter of the runserver command.

It’s normal behavior. Setting debug to false is for the purpose of Django application deployment.

as quoted from the documentation:

Django doesn’t serve files itself; it leaves that job to whichever web server you choose.

We recommend using a separate web server – i.e., one that’s not also running Django – for > serving media. Here are some good choices:

https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/modwsgi/#serving-files

I used NGINX to serve images in a http deployment, and then the images worked when debug = false.