Home > Docs > Import Export Suite for WooCommerce > Troubleshoot – Common errors on importing WooCommerce product images

Troubleshoot – Common errors on importing WooCommerce product images

Last updated on June 19, 2023

Following are some of the errors you may have encountered while importing products with images:

Server request block (Error getting remote image)

While importing images using URLs that are residing in an external server, you may have come across errors like ‘Error getting the remote images’ in your log file.

Log file with error getting the remote images.

Most of the time, image fetch failure may occur due to the server request blocking issue. The server in which you have hosted your images may not allow access to retrieve the images.

Workaround:

If you have encountered this issue while migrating your site, we would recommend to go for the following method.

  1. While exporting you will get options to export images as separate zip or to use the URL in the CSV. The best practice would be to export the images as a separate zip.
  2. After exporting images as a zip file, extract that zip to the /wp-content/uploads/directory and then provide the image name in the CSV file.

In cases other than migration, you will have to probably identify the reason for the server block and get it resolved.

Also, ensure that valid or direct image URLs are specified instead of any publicly hosted one to get rid of this issue.

Duplicate entry in Media Library

The duplication entry of images may occur in two cases:

  1. Importing multiple products with the same image name in the CSV

If images with same name are being imported, by default, WordPress will treat each image separately and upload it into the media library with the same name in an incremental hyphenated number pattern.

For instance, when you use the same image for different simple products or for each variation in a variable product. However, the exported CSV file will contain multiple image URLs. This will result in duplicate images on your server and slow download time while importing the products. See the screenshot below:

Sample of CSV file with multiple images
Sample of CSV file with multiple images

Workaround:

To overcome this, you can provide the respective image name (image-name.jpg) instead of the URL. That is, keep the URL once in the images column, and for the subsequent use of the same image, provide only the image name in the column.

A screenshot of sample CSV is as shown below:

Sample of simple product images with image names
Sample of simple product images with image names

Though this is pretty straightforward in the case of simple products, it can get a bit tricky in the case of variable products.

Sample of variable product images with image names
Sample of variable product images with image names

For example, we have iPhone as a variable product on our store. Based on the attribute “color”, there are two variations: Black and White, which need different images. We have another attribute “storage”, which again creates three variations (16GB, 32Gb, 64GB), but can use the same image.

In this example, we used the same image for variations Black 16GB, Black 32GB, and Black 64GB.  Now you can see (above screenshot), we have used the URL only once for the Black variations. Whenever it is repeated in the CSV, we added the image name. And when a different image is used (for the white variations), we added the URL once and just the image-name.jpg in subsequent cases.

2. Updating existing products

If you are about to update existing products using CSV, you can avoid duplicate image entries in either of the following workarounds:

  1. Unmap the image column on import so that the images are not uploaded again into your site.
  2. Specify just the image name instead of the complete URL on import. That is, if the images are already uploaded in the media library then you can simply use the image name along with the extension in the CSV for reusing it.

Multiple images not getting imported

If there are multiple images for a product in your CSV file, all the images must be inserted in the images column of the CSV with each image separated by a pipe symbol.

If you are using some other symbols for separating the images or if the images are inserted in different columns, then it is likely that the images are not imported into the site.

Workaround:

To overcome this, you may manually edit the image column in the required manner.

If the images are placed in multiple columns, refer to the article: Importing Multiple Product Images From Multiple CSV Columns.

Image not getting imported

The image may not be imported due to multiple reasons. On checking the log file, if the reason is: Invalid image: Sorry, this file type is not permitted for security reasons, then you can use the below mentioned code snippet to resolve the issue.