I am adding new products , and I want to copy the images , and keep them with the same name. In most cases it seems to work , but one particular product ( and possibly others ) has me baffled.
- I have deleted ALL products
- I have deleted ALL images in media/catalog/product
- I have disabled the cache , redindxed and I have even a run magerun addon to remove any orphan references / orphan files.
I am using addImagetoMediaGallery
$targetProduct->addImageToMediaGallery($importFilepath,$sourceImage['types'],false,$sourceImage['exclude']);
The image is set up correctly in terms of linking to the product and correct types , however it persists in adding a _1 to the and of the first part of the filename
So:
th_new-l_4_2.jpg
becomes
th_new-l_4_2_1.jpg
( Yes I do realise that it already has numbers appended from previous database )
Note: For other products , it seems to keep the filename as is.
This image does not exist anywhere that I can find in either the file system or the database ( I have been through pretty much all of the product / attribute / media tables.
If you have any idea why it would be doing this when the product does not exist I would appreciate your time. Thanks!