Reputation: 129
On my website Magento adds _1 to the end of some Image urls.
So my normal basic urls should be ...media/catalog/product/cache/9/A/E/test-small.png
but somehow for some images it alters to ...media/catalog/product/cache/9/A/E/test3-small_1.png
My normal image names are unique numbers so I´m confused why this happens? Could anyone help?
Upvotes: 1
Views: 994
Reputation: 30
If anyone comes across this post using M2 and is having the same issue. Check out the media/tmp folder. I was working on an api image sync and the name kept having a _1, _2 etc after the image.
It turns out Magento doesn't always give a clear reason if something fails in the api so the file was making it to the tmp directory but never the final destination causing the file name issue.
Upvotes: 0
Reputation: 1
It is magento's by default feature, if the image name you are trying to upload already exist it will rename your current image name with _Number. Check before uploading.
Thanks
Upvotes: 0
Reputation: 39324
Magento will add a _1
after any image if the file already exists on the server.
Please mind that Magento is not doing cleaning of the images of products when / if you delete one product.
Upvotes: 1