Pictures in Database or File System? What performs better.

6 years ago
Hi,

we've an Online Shop with about 20.000 Products and 50.000 Pictures. The database is about 3 GB.

So my question is what is more performant, having the pictures in the DB or in the File System.

Thank you
Markus
6 years ago
No experts here???
6 years ago
Hi,

If you keep in file your pictures it is better for you . Also next time you can move cdn then performance will increase .

Thanks
6 years ago
markus507 wrote:
Hi,

we've an Online Shop with about 20.000 Products and 50.000 Pictures. The database is about 3 GB.

So my question is what is more performant, having the pictures in the DB or in the File System.

Thank you
Markus


We have tested this, there is no significant performance difference between both. However, for the first time access storing images in db is little slower for first time access, but it is not significant. If you select to store image in db, then only the first primary image is stored in db, and all the generated images for different dimensions are stored in the file system only. And if those images are missing then only images from db are accessed.

If you're worried about db size then store it in file system otherwise you can store it in db. However, smaller db is much easier to maintain, so I would select to store it in file system.