I am getting thousands of pictures uploaded by thousands of users on my Linux server, which is hosted by 1and1.com (I believe they use CentOS, but am unsure of the version).
I would do the following:
Using a hash also lets you merge the same image uploaded multiple times.