2

I am writing a Webapp using PHP and JS at client Side i am using mysql at the back. I want to store the images when the database record gets added for example you can consider a profile pic. which is the good practices whether to convert it to base64 and store it into DB itself or to upload image separately and use its uploaded path in DB.

sarsarahman
  • 1,008
  • 4
  • 11
  • 24
  • Look here: http://stackoverflow.com/questions/9722603/storing-image-in-database-directly-or-as-base64-data –  Nov 26 '13 at 07:36

1 Answers1

2

I haven't found a good reason to store pictures directly into the DB itself. It is waaaaaay to consuming for the database.

Always use the path to the picture in the database and store the picture sepperately

Semir Cato
  • 29
  • 2