I have a lot of SKU's and a lot of SKU's share some pictures.

For eg - Product A, B and C have 2 common photos. When I upload the common photos through the panel, It uploads the same image to the server again and again by adding _1 in the file name.

Also tried using bulk upload but get errors. I don't want this duplicating of photos as I have a lot of SKU's and photos and my server won't be able to handle all that data.

Is there any solution to this?

  • Its core functionality of magento. If one image(a.jpeg) have uploaded for some product(A). Again we upload the same image(a.jpg) for another product its uploaded (a_1.jpg). Its the default core functionality of magento. – Thangam May 21 '18 at 7:15
  • I understand. But this isnt feasible for me and i would need an alternative. – Tanish May 21 '18 at 7:42
  • Refer this link pixelpaul.net/magento-share-images-on-more-products . It would help you to solve this. – Thangam May 21 '18 at 9:16

This is a known core bug in Magento 2.2+

Github issues here:

And pull requests here:

I'm using the first PR successfully in production, and patched using cweagans/composer-patches after every composer install.

Keep in mind both PRs have limitations and haven't been tested properly.

| improve this answer | |
  • How do you use the PR? – user2240778 Aug 28 '19 at 14:27
  • @user2240778 you'll need a developer to create a patch for your installation – Erfan Sep 3 '19 at 5:40

I was able to fix this issue in Magento 2.3.2 by adding second parameter to uploadMediaFiles method as true in magento/vendor/magento/module-catalog-import-export/Model/Import/Product.php line 1799.

$uploadedFile = $this->uploadMediaFiles($columnImage, true);

You need a preference or a plugin to achieve this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.