0

I am working with my project and i need to insert pictures in each data. My problem is how can i put pictures in my database using xampp as my back end.

  • I do not recommend storing large blobs in a RDMS, I recommend you use a noSQL DB instead. Take a look at https://stackoverflow.com/questions/2278186/storing-images-in-nosql-stores – ckaserer Dec 03 '19 at 13:30

1 Answers1

0

@Nico_robin, Please do not insert IMAGE in your MySQL Database, It is a bad practice!!! What you can do is to save the Images in you server possibly in your images folder / User upload folder. Save the image path( file/folder name) in your column. That's one of the better ways.

In your usecase If it is a Hard requirement to save images in DB then try using LONGBLOB or MEDIUMBLOB

Also Check this URL Storing image in database directly or as base64 data?

dee flor
  • 67
  • 8