I am currently undertaking some house keeping project using Magento and have noticed duplicate images on our server.
I believe that the issue is where configurable products with a number of associated simple items have been loaded into the system via a CSV file.
For example:
simple | small | /t-shirt-black-sku-1.jpg
simple | medium | /t-shirt-black-sku-1.jpg
configurable | /t-shirt-black-sku-1.jpg
Looking in the catalog/product
folder on the server I see the following:
t-shirt-black-sku-1
t-shirt-black-sku-1_1
t-shirt-black-sku-1_2
We will soon be moving hosting providers and I want to ensure that we are not importing across any unnecessary files. As you can imagine, the duplicate images are bloating the overall size of the website considerably.
My questions is: Are the images for the associated simple items really necessary and are there any drawbacks to deleting them from the server?
I'm guessing that going forward, the best thing is to not include the product image name in the CSV for the associated simple items within a configurable product.
I hope this makes sense and any advice would be greatly appreciated.
Best Answer
If you are running a Mage_ImportExport routine to import that csv file, each time the import runs it will generate a new image on the system with a suffix _x where x is the next free number. We've found this behaviour quite annoying.