Pictures storage . Database or disk?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I have over 20K items and they all have pictures.

Where should I save all the pictures?
7 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
7 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.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.