Hi everyone,
I’m a beginner Django developer, and I recently finished my first full-stack project called Luna Books, an online book shopping application.
The project is working well overall, but I’m stuck on one deployment issue that I haven’t been able to solve.
Everything works correctly on my local machine, including product image uploads and display. However, after deploying to Render, all of my product images are missing. The rest of the application works as expected, including the PostgreSQL database connection.
Current situation
Local development
Product images display correctly.
Image uploads work normally.
Live deployment (Render)
Website loads correctly.
Products are loaded from the PostgreSQL database.
Product images don’t display.
Image URLs return 404 Not Found.
For example, one of the image URLs is:
/media/book_images/Ikigai-frond.jpg
The database still contains the image paths, but the image files are not being served in the deployed application.
After deploying the project, I noticed that product images were missing only in the live version. I first checked my Django code, media settings, and deployment configuration, but I couldn’t identify the cause.
As part of my troubleshooting, I then configured Cloudinary for media storage. The images appeared briefly on the live site, but after another deployment they disappeared again.
So far I’ve tried:
- Checking my media and Cloudinary settings.
- Adding the required Cloudinary environment variables.
- Re-uploading the images.
- Redeploying the application.
- Verifying that the database still contains the correct image paths.
My project uses:
- Django 6.0
- Python 3.13
- Render
- PostgreSQL
- Cloudinary
- WhiteNoise (for static files)
At this point, I’m not sure whether the issue is related to my Cloudinary configuration, my Django media setup, or something specific to Render.
Has anyone experienced something similar, or is there anything else I should check next?
I’ve attached screenshots from the deployed application showing the missing product images. If any additional information or relevant code would help, I’m happy to share it.
Thanks in advance for any guidance!
