Pictures storage . Database or disk?

3 years ago
I have over 20K items and they all have pictures.

Where should I save all the pictures?
3 years ago
It depends on what's more important to you (as per your requirement / business needs). There are pros and cons for both:

If you save images as file system:

- Smaller database size & better performance
- If your data is in files you can view or manipulate it anyway
- Moving/copying your data is simple and straightforward
- In file system, data is human readable (you can view / access images easily)

If you save images in database:

- It can increase the database size very quickly
- Simpler data backup (everything is at one place)
- If transactional integrity is important, you might want to consider saving images in DB
- Consistent data
3 years ago
Hi. thank you for your replay.

I'm using Microsoft azure as my hosting.

VM Server:     Standard DS1_v2 (1 Core, 3.5 GB memory)
Database Tier: Standard S0 (10 DTUs)

I used to save all the pictures in DB.
It was kind of slow when user click on one of the category for first time.
It took about 10's for 1 page of products(12 products) to load, but just first time.

Now I'm changing all the pictures to file system. hopefully it will be faster.