If image file paths in DB, where do I store image?

Posted by Low_Oil_7522@reddit | learnprogramming | View on Reddit | 7 comments

Hi!

In the past, I created a 'social media' app on heroku. You could take an image and it would post on a page.

I found that like once a day the app would reset and all of the images would disappear.

Even if storing only the image path in a database is the best practice, I'd still store the image on the heroku app. Here it would still remove all images when it resets.

On my local machine, storing the image in the same directory as the project works fine. Once moved to heroku, those files get removed.

I think this is a pretty normal concept. What are the best practices?