Storing a million images in the filesystem
I am designing a website which will potentially have millions of images. Whats the best way to arrange them..All of the images are uploaded by some users. I am thinking of creating a folder structure with their user id and put the image in it..Does it make any server issue..like maximum number of folders or server performance..Please let me know if you can think of some best architecture...?
Another way I am thinking was: create folder from a to z and inside I will create user's folder and keep the images
Thank you for your valuable suggestion
I will use Linux file system..php to upload files, gd2 to resize images.