Use the hierarchy of the file system. ID your images using something like 001/002/003/004.jpg would be very helpful. Partitioning is a different story, though. Could be random, content based, creation date based, etc. Really depends on what your application is.