Recently, I and my colleagues, we are discussing how to build a huge storage systems which could store billions a pictures which could searched and download quickly.
If you are really talking about billions of images, I would store them in the file system because retrieval will be faster than serializing and de-seralizing the images