Reputation: 447
I am working on a restaurant platform and ask myself where to store profile Images best. Do I create a subfolder in my public/images for every restaurant? Or do I store every image with an id? Or store the path to a DB?
Every restaurant has his own profile image + 3 additional images, let's assume I have 100 restaurants, for my understanding this will create 100 subfolders.
Thanks in advance
Upvotes: 1
Views: 177
Reputation: 305
Create folder public/assets/images/restaurants
Save the image as restaurantname_imagename
I think this is the best way.
Upvotes: 1