title: How do you store images for asp.net application?
body: <p>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.</p>
  
  <p>So far I am thinking about two options:<br>
  1) store images in db - images are loaded from Db into stream then into image (displayed by using IHttpHandler)<br>
  <em>Pros</em><br>
  - The image itself is part of class, business object which we are working with in code behind<br>
  - one place to maintain product data<br>
  <em>Cons</em><br>
  - memory consumption
  - traffic increase as we get the product data from other API</p>
  
  <p>2) store images in file system  - images are put in page as link<br>
  <em>Pros</em><br>
  - none impact on memory as it is not stored in session, app cache.It is used like simple link<br>
  - no memory consumption<br>
  <em>Cons</em><br>
  - needs to keep some name convention for images in File system (perhaps even some folder structure)<br>
  - more complicated maintenance of images</p>
  
  <p>Is there any other suitable mechanism? What would you advice to use?</p>
  
  <p>Personally I prefer images in file system, but it can be harder to maintain it as there are two separate places.  </p>
  
  <p>Thanks for any comment. X.</p>
  
  <p>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?</p>