Why my images are not showing when i deployed to render after visiting the site after long time?

Please take a look at following images :point_down:, what might be the problem?

Hey there,

That looks like references to images that don’t exist, are you uploading them somewhere? Are they in the deploy?

John B

I deployed empty image folder, and the images are uploaded by the user which is visiting the site. Do the uploaded image not hosted directly on render whenever it is added after the deployement? Do I have to use another service for hosting the images?

Hi there,

It very much depends on where you’re uploading them to in your service.

As you’re using a free plan, you may be uploading them into the service, but then they are lost when the service is redeployed/restarted as there is no persistence by default.

To be uploading them to your Render service and keeping them, you’d need to have a Disk attached (https://render.com/docs/disks) and you’d need to be using a paid plan as disks aren’t available on the free plan. You’ll need need to make sure you configure your application to store uploads in the mounted disk path.

Other options would be to upload images to a service like S3 and store a reference to them in your database but that can be a lot more complicated to implement,


John B

Ok, Thanks for answering John!

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