Product Import Export Plugin for WooCommerce facilitates the importing of products along with their associated images. The main advantages of this plugin, with respect to images, are as given below:
- Imports multiple product images.
- Generates thumbnails for the product images.
- Downloads the image from the provided URL in the CSV file to the server of your store.
- Re-uses product images from the Media Library.
The URL of each product image must be entered in the image column of the CSV file which is to be uploaded. For importing multiple images of a product, the URLs must be separated by the vertical line character ‘|’. During import, the first image is taken as the Product image and the rest of the images are added into the Product gallery.
Note: The CSV Import file must be in UTF-8 format. For more information about UTF-8 encoding, See How to save CSV / Excel File as UTF-8 Encoded?
Now, let us get an understanding of importing a CSV file containing products with images.
Suppose, you have a CSV file with a variable product – T-Shirt, with product image, gallery image, and images for each variation of the product. In this file, the URLs of the product image and gallery image(s) of each product are separated by the vertical character “|”, as shown in the screenshot below:
Note: Click Sample CSV of importing Images to download it.
Following are the steps to import products with images:
- Move to Import Products in CSV/XML Format in the Import section of the Product settings tab. Further settings appear as shown in the screenshot below.
- You can choose either of the methods for uploading the CSV file. In this article, we are selecting the first method. That is, uploading a CSV file from your computer.
- Click Choose File to browse a required CSV file from your computer.
- Select a mapping file, or click Upload file and import to move ahead and create a new one.
- Enter a mapping filename and map the required WooCommerce Product Fields with column headers of the CSV file. Use Evaluation Field to fix/update the required value for a particular field.
- Click Submit to start importing products into your WooCommerce store.
Based on the CSV file imported, the products and its respective images get added to your store, as shown in the screenshot below:
The plugin generates thumbnails for products by using the URL of the image which is specified in the CSV file.
To view imported products, move to the WooCommerce Product page. The imported products with a respective thumbnail will be displayed as shown in the screenshot below:
To view product image, gallery image(s) and product variation images, open the individual product page. The imported images will be displayed as shown in the screenshot below:
From the above screenshot, we can see the variable product – T-Shirt is imported to the WooCommerce store with four variations. The respective product image, gallery images, and product variation images are successfully imported with thumbnails.
Note: All the imported images are uploaded to the server of your store from the mentioned URL in your CSV. Make sure the image URLs are correct. If the images are already present in your WordPress Media Gallery, you can re-use the images. Read more about this process in the below section.
There will be cases where you can re-use the product images from the media library. 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:
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:
Though this is pretty straightforward in the case of simple products, it can get a bit tricky in the case of variable products.
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.
For more information on importing and exporting of products, read our setting-up documentation.