I want to save the profile picture, and I want to know what is the best option.
-Saving the path in the DB and load the image according to his location.
-Save the whole image.
I'm using EntityFrameWork and SQL server Database
I want to save the profile picture, and I want to know what is the best option.
-Saving the path in the DB and load the image according to his location.
-Save the whole image.
I'm using EntityFrameWork and SQL server Database
It depends on your application needs, Look at the answers in this post Storing Images in DB - Yea or Nay?
Storing images into database has some pros and cons
Images stored in the database do not require a different backup strategy. Images stored on filesystem do
It is easier to control access to the images if they are in a database. Idle admins can access any folder on disk. It takes a really determined admin to go snooping in a database to extract the images
On the other hand there are problems associated
Require additional code to extract and stream the images Latency may be slower than direct file access Heavier load on the database server
I suggest to save the image somewhere on file system and store path of that in database.
Advantages:
All over the web, most of the images are stored in filesystem.