Can anyone please tell me the disadvantages of storing images in a MySQL database?
Is it not as efficient as storing the images on the server? Will it take longer for the images to download vs disk storage and will it put heavy load on the database? Appreciate the help!
Asked
Active
Viewed 2,359 times
5

Joey Morani
- 25,431
- 32
- 84
- 131
-
possible duplicate of [Storing Images in DB - Yea or Nay?](http://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay) – Lasse Espeholt Sep 22 '10 at 16:26
2 Answers
2
Of course it might be a little slower than if you save them as files. Always depends how big and how many images you have.
We store the profile images in the DB and that works fine. It also makes the handling easier, because you don't have to worry about the file system and if you backup the DB, everything is backuped (is that a word?).
Assuming you are not facebook or flickr I would not worry about it.

Remy
- 12,555
- 14
- 64
- 104
2
One advantage you get from storing images on the disk is that you can serve them directly with a fast web server (nginx), which doesn't have to hit your code at all. Another one is that you can easier switch to a CDN later if you have to.

ibz
- 44,461
- 24
- 70
- 86