Images in database
Hi Experts,
We are going to create Photo Printing & Social Networking site like Shutterfly.com,picsqare.com,kodakgallery.com,faceb ook.com.
Everything is running fine. But Now I am facing some problems.
When user Upload several(no limit) his/her Photo(s), I save those photo in Sql Server Database in Image datatype. & we are saving three sizes of every image. (one is original, second is thumbnail size & third one is larger then thumbnail and smaller then original)
I have some reason to save Images in sql Server.
1. In database it will take a little bit storage space.
2. We can take backup easilly of whole data.
but the main issue in this process is that we have to create images in everypage, everytime with the help of HttpHandler from byte array to image(.net datatype). & this will be a costly process when traffic will increase.
So now i am thinking to save uploaded images in our web server & image path in sql server database.
But in this process,there is an issue related to Image size. Because If save image physically then it will take its original size(may be in MB). Means if there are 1000 users & each user upload 20 MB data then it will take more then 1000x20 MB data.(because we have to save three sizes).
Facebook saves 5 sizes of every image. But i dont know that how they are saving images(in database or in web server).
Pls guide me experts !
Regards,
Anuj Rathi
|