We simply update our ASP.Net store implementation (from simple) to a structure that needs to be more flexible. I'm just looking for some image storage options related to the product. (there will be two types of images, the thumb of the product, and then a full view of the product image). He must process at least a hundred products.
So far I am thinking of two options:
1) store images in db - images are downloaded from Db to the stream, and then to the image (displayed using IHttpHandler)
pros
- The image itself is part of a class, a business object, with which we work in the code behind which there is one place for storing product data
Minuses
- memory consumption - increased traffic, because we get product data from another API
2) store images in the file system - images are placed on the page as a link
pros
- does not affect memory, since it is not saved in the session, application cache. It is used as a simple link.
- lack of memory consumption
Minuses
- you need to save some kind of agreement on the names of images in the File system (perhaps even in some folder structure)
- more sophisticated image maintenance
Is there any other suitable mechanism? What would you recommend using?
Personally, I prefer images on the file system, but it can be harder to save, because there are two separate places.
Thanks for any comments. X.
By the way: I can really imagine that at some point the product will also have some videos or any other media that should also be displayed. In this case, Db is not really an option, is it?
source share