BASE_DIR = Path(__file__).resolve().parent.parent
DEBUG = False
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
INSTALLED_APPS has 'django.contrib.staticfiles'
This is how they're called in HTML
<img src="{% static 'capabilities-2.jpg' %}" class="img-fluid">
Displayed in my console:
[10/Sep/2022 17:39:50] "GET /css/index_styles.css HTTP/1.1" 404 179
[10/Sep/2022 17:39:50] "GET /js/scripts.js HTTP/1.1" 404 179
[10/Sep/2022 17:39:51] "GET /static/index/images/capabilities-2.jpg HTTP/1.1" 404 179
[10/Sep/2022 17:39:51] "GET /assets/favicon.ico HTTP/1.1" 404 179
Trying to transition from Dev to Production. I had the images working in development.
If I inspect the images (or lack of images) within a browser, the path is as follows:
Should be noted that I can't even see them when inspecting the source.
I tried adjusting the paths /static/capabilities-2.jpg to /static/index/images/capabilities-2.jpg as it is in my project but that still didn't work.
I'm running on Linode, Ubuntu 22.04. I like a lot about Django, but static files are being a huge PIMA.