Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Normal image storing or mySQL blob?

Tags:

php

mysql

i'm programming a php/mysql web app which is kinda like a blogging platform where people can upload pictures and post them.

What is the best way to store these images , Storing them in a folder or in mySQL table through BLOB ?

i ask this because i want the most simple way which let me easily move to another host/server without spending days to download all posted pictures , and upload them to the new server.

Optional Question: Is a dedicated server enough for a started blogging platform?

Thanks

like image 623
CodeOverload Avatar asked Dec 29 '22 02:12

CodeOverload


1 Answers

Out of the database. When it's out of the database your webserver can do its job and make clients cache the images. Doing so with a database-driven dynamic image is more complex. Additionally, you'll find you'll likely get much better performance by allowing the webserver to deal with it.

like image 144
Xorlev Avatar answered Jan 11 '23 07:01

Xorlev