Knowledgebase
Home > Knowledgebase > ECT Admin image upload / resize for ASP > How do I use image path formats?
How do I use image path formats?
Normal use
By default, the software will place all your small, large and giant product images into three folders, simply named small, large and giant, and then give them a file name based on product ID and image number (1-5). So for example with a product ID of PC001 the first set of three images would be saved to the server as:
prodimages/small/pc0001-1.jpg
prodimages/large/pc0001-1.jpg
prodimages/giant/pc0001-1.jpg
For many users this default behavior will be fine and there's no need to change anything. Avoid using special characters or spaces in your product IDs as these can cause problems with image paths.
Advanced use
If you would like to organize your images by category or perhaps you use a lot of images per product and would like to have one image folder for each, then you can use image path formats in the configuration page to create a more detailed system. Using these placeholders:
- {pid} = product id
- {psection} = product category id number
- {psectionname} = product category name
- {img#} = which image is it (1 - 5)
you can construct your desired folder structure to include category and product ID. The actual folders will be created automatically by the software.
Example 1: creates a separate folder for each product and stores all its images there
e.g., for product PC001, you would get: prodimages/pc001/pc001-1_small.jpg
Small image path format = prodimages/{pid}/{pid}-{img#}_small
Large image path format = prodimages/{pid}/{pid}-{img#}_large
Giant image path format = prodimages/{pid}/{pid}-{img#}_giant
Example 2: stores all images for a product category together,
e.g., for product PC001 in category "Systems", you would get: prodimages/systems/pc001-1_small.jpg
Small image path format = prodimages/{psectionname}/{pid}-{img#}_small
Large image path format = prodimages/{psectionname}/{pid}-{img#}_large
Giant image path format = prodimages/{psectionname}/{pid}-{img#}_giant