I am trying to figure out the best way to layout my directory structure so that I can store images from multiple users in a way that would be scalable when used in combination with a database. The database will store the absolute path to each image.
So lets assume I was dealing with users' profile images each of which would have thumbnails of a different size. Would the structure below be sufficient:
/profile_images
/user_1
/image_a
image_a.jpg
image_a_small.jpg
image_a_tiny.jpg
/image_b
image_b.jpg
image_b_small.jpg
image_b_tiny.jpg
/user_2
...
/user_3
...
So my question is whether such an approach would be good. If not, could someone please suggest a better approach that uses a database and filesystem to manage image uploads. Thanks