We are just upgrading our ASP.Net shop implementation (from simple one) to structure that should be more flexible. I am just looking for some options how to store images related to product. (there will be two types of images, thumb of the product and then full view images of the product). It should handle at least hundred products.
So far I am thinking about two options:
1) store images in db - images are loaded from Db into stream then into image (displayed by using IHttpHandler)
Pros
- The image itself is part of class, business object which we are working with in code behind
- one place to maintain product data
Cons
- memory consumption
- traffic increase as we get the product data from other API
2) store images in file system - images are put in page as link
Pros
- none impact on memory as it is not stored in session, app cache.It is used like simple link
- no memory consumption
Cons
- needs to keep some name convention for images in File system (perhaps even some folder structure)
- more complicated maintenance of images
Is there any other suitable mechanism? What would you advice to use?
Personally I prefer images in file system, but it can be harder to maintain it as there are two separate places.
Thanks for any comment. X.
BTW: I can really imagine that in some stage the product will also have some videos or any other media that need to be displayed too. In this case Db is not really option, isn't it?