I'm writing an application that allows users to upload images onto the server. I expect about 20 images per day all jpeg and probably not edited/resized. (This is another question, how to resize the images on the server side before storing. Maybe someone can please drop a .NET resource for that in the comment or so). I wonder now what the best practice for storing uploaded images is.
Is it a) I store the images as a file in the file system and create a record in a table with the exact path to that image.
or b) I store the image itself in a table using an "image" or "binary data" data type of the database server.
I see advantages and disadvantages in both. I like a) because I can easily relocate the files and just have to change the table entry. On the other hand I don't like storing business data on the web server and I don't really want to connect the web server to any other datasource that holds business data (for security reasons) I like b) because all the information is in one place and easily accessible by a query. On the other hand the database will get very big very soon. Outsourcing that data could be more difficult.
Cheers, Tobias
Edit: http://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay