Static Files (Including Images) Not Displaying in Django Web App After Deployment

23 Views Asked by At

I have developed a web app using Django, and during development, all my static files, including images, were displayed correctly. However, after deploying the project, the images are not being displayed on the website. Instead, I either get a blank space or the alt description.

Here Settings.py:

I have developed a web app using Django, and during development, all my static files, including images, were displayed correctly. However, after deploying the project, the images are not being displayed on the website. Instead, I either get a blank space or the alt description.

My Static folder is located inside project:

Project/ app/ static/ images/ css/ js/ media/ project/ init.py manage.py requirements.txt

and the tricky part is that the logs says that it's being found as i get log 200 on each images.

  1. Checked my Django project settings to ensure that STATIC_URL and STATICFILES_DIRS are correctly configured.
  2. Verified that my static files (including images) are present in the expected location on the server.
  3. Checked for any errors or warnings in the browser console, but found none related to missing assets.

Despite these checks, I'm still facing this issue, and I'm not sure what else to look for. Can someone please provide guidance on how to troubleshoot and fix this problem? Are there common mistakes or misconfigurations that could lead to static files not being displayed after deployment?

Any help would be greatly appreciated. Thank you!

0

There are 0 best solutions below