You should set the source attribute dynamically, rather than the name attribute. Get its value, the image path linked to a particular product, from a database query.
Thanks for the reply. The image source="C:\ColdFusion9\wwwroot\shotthp\#product.proimage#" is set dynamically. As the #product.proimage# finishes the path to the actual images Which some are in different folders.
The image path is actually "C:\ColdFusion9\wwwroot\shotthp\image\source\hats\caps\photo24.jpg" as is the next image should point to "C:\ColdFusion9\wwwroot\shotthp\image\source\hats\caps\dcs_45.jpg" which normally displays a different image But the page is displaying the same image in each thumbnail.
Assuming that 'product' is the name of the query that contains the path of the image of each product, then you could just use cfoutput. I have assumed in the following that each row in the result-set corresponds to a specific product.
<!--- In what follows, myImage is the dynamic name for the image corresponding to each row --->
<cfimage source="C:\ColdFusion9\wwwroot\shotthp\#product.proimage#" name="myImage">
<!--- Turn on antialiasing. --->
<!--- More code pertaining to each row, hence to each product. For example, create the folder, scaledProductImages, beforehand and store the edited images for later use --->
<cfimage source="#myImage#" action="write" destination="C:\ColdFusion9\wwwroot\shotthp\scaledProductImages\#product.proimage#" overwrite="yes">