I am trying to implement the “profile page” for the user of the web application.
I want the user to be able to upload the image for their profile.
My question is that how should this be implemented?
Should I upload the image in the database as a blob, or shall I upload the image in the server and store the path in the database?
What should be the optimum size of the an image, for user profile?
I am using the following.
1. Mysql 5.5.11
2. Spring 3
3. hibernate
Your help will be appreciated.
Regards
Adofo
Store the image as a file on your server and store the image ID or path in your database. If you do it this way, you have to just a little more work on file clean-up for deleted users. A JPEG image size of 40-80K is a reasonable target for a “profile picture.” The real constraints on this are your server performance and traffic volume.