I'm currently coding my own little project, so users can create avatars / banners online with it. My current folder structure is: images/2012/06/14/. I have to store 3 images per user: background, text, final image.
What is my aim, is that i could get as short as possible links to final images. I checked popular image hosting sites. Imgur direct links are like http://i.imgur.com/blabla.jpg
and tinypic http://i50.tinypic.com/afisaf.jpg
. I already have sub domain "i" and it points to my image dir.
Does anybody know how those short links are made? I know, that i could just point i.domain.com to dir that contains final images, but i don't know that if it is best way, cause then one dir could contain thousands of images.
And how much is recommended maximum amount of files per directory, so that it won't influence to performance?