The legacy e-commerce website I am working on at the moment uses the product id to name the image for each product. The image name and location are not stored in the database. So the product details page builds the product image name using the product id and reads it from the product folder.
New requirements have come through where they want to have 6 alternate sizes and some alternate views of the product (0 - 4 alternate views). I am not sure the current technique will scale very well. Looking for files of alternate images would be a lot more expensive then reading file names from a database.
The website is ASP .Net 2.0 and using SQL 2005.
At the moment I am thinking about having a new table to store productid, image path and type. So each product can have multiple product images. Then I will have to introduce a range of types for the different sized images and different logic around fetching the right type from the database.
What techniques do other sites use to multiple store images?