Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Experts,

I have a doubt in asp.net project, I have a module in my asp.net project which involves Image Uploading...

I am confused about storing the image....

Which is the best and perfect method to store an Image, Is it store in Database or in a folder..??

Which is best..??


Thanks and Regards,

Dileep
Posted
Updated 28-Mar-13 7:15am
v2

It depends on how many images do you have, how do you classify them. One of the most popular approaches is to give them unique file names and put in some directory on your server side and store just the file names in the database.

—SA
 
Share this answer
 
Security wise you can store the pictures in the database .on the other hand, performance wise you can store the pictures in a directory or virtual directory and keep the path at the database
 
Share this answer
 
Storing images in database is not useful, unless you are changing them frequently.
Otherwise, they are more complex to manage and you always need to code for them at server side,
so for keeping things simple you should avoid using them.

These links can be of some help,

link 1
link 2
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900