My images are not showing after a few hours of creating

I hope you’re well. I’m encountering an issue with my Node.js application deployed on Render.com. After a few hours of creating products with attached images, the images stop displaying correctly.

Issue Description:

  • Images are uploaded successfully during product creation.
  • Initially, images display fine on the front end.
  • After a few hours, images no longer appear.

Steps Taken:

  • Verified express.static middleware is correctly configured.
  • Confirmed image paths are stored accurately in the database.
  • Cleared browser cache and tested on different browsers.
  • Restarted the server on Render.com.

Request: Kindly investigate and resolve the issue, as images are essential to my app’s functionality. Your guidance on how to maintain consistent image display would be appreciated.

Thank you for your prompt assistance.

Best regards,

Hi,

Render instances have an ephemeral filesystem, meaning any file written to the instance after it has booted will be lost when it next restarts (e.g. spun down if on free instance type, next deploy, manual restart, etc.).

If you want to use file uploads on your service, you’ll need to have a persistent store, e.g. a Render Disk (which is chargeable and also require a paid instance type) or an external service like AWS S3.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.