The issue of duplicate images in the media library of the WooCommerce website when importing images from the CSV file.
The reason for this happening is that the Product Import Export Plugin for WooCommerce uses WP Importer. The WP Importer has a 1:1 relationship with the product and its corresponding image. So when you upload an image via CSV, an entry of the image for the product is added to the media library resulting in the duplication of the image. This happens because at the moment there is no way to check whether an entry already exists in the media library. The duplication of an image in the media library is normal and the important thing to keep in mind is that it’s just an entry.
Even if you have multiple images in the media library, the images are not however duplicated on the server this way. The only way the images are duplicated on your server if you use the full URL path of the image. So, to avoid using up too much space on the server, simply use the image name (image.png) instead of the complete image URL in the images column. It will link the product to the image and will result only in the generation of thumbnails.
- Was this article helpful?
- Yes, thanks!Not really
November 21, 2022
This article is not accurate. I uploaded a set of images to the WordPress Media Library then imported the corresponding products with the Product Import Export Plugin for WooCommerce plugin via a .csv file with the images column populated with only the image name (example: image.jpg), not the full URL, just as this article suggests. When the import was complete I looked at the Media Library and the /wp-content/uploads/ folder on the server and noticed the import process duplicated all the product images that were already in the Media Library, adding a “-1” to the file name of the duplicate images. I checked the products to see which image version was linked to them and all of them linked to the duplicate image version instead of the original. Based on my testing, it does not appear that imported products can be linked to images that already exist in the Media Library without duplication. If that is not true, please tell me what I did wrong. Thank you.
November 25, 2022
Can you please reach us via support so that we can check it and help you?