Running Magento 2.3.2 on PHP 7.2
CSV being uploaded has one image for base_image, small_image, thumbnail_image, swatch_image, additional_images.
When products are imported, product images are getting duplicated both in the backend and on the front end as follows.
I found a possible solution at github https://github.com/magento/magento2/pull/21855
And used this file (there are more than 3000 lines of code, too long to post here)
I replaced the product.php file at
with the file mentioned above
But when I try and import I get the following error.
Warning: hash_file(/home/xyz/abc/pub/media/catalog/product/v/v/vvg.jpg): failed to open stream: No such file or directory in /home/xyz/abc/vendor/magento/module-catalog-import-export/Model/Import/Product.php on line 1778
How can I fix this issue of image duplication on import.