Exporting and Importing WooCommerce Product Images With a Zip FileSafwana
The Product Import Export Plugin for WooCommerce provides the option to export images associated with a product of a WooCommerce store into a CSV file. The plugin allows to import and export multiple product images, generate thumbnails, re-use product images from the media library, etc.
There are two options with which the images related to the products can be exported and imported. In addition to the default method in which the CSV file contains the entire URL path of the images, the plugin introduces another way to import the images. In the second method, the plugin provides an option where all the product images can be downloaded in a zip file; in this case, the accompanying CSV file will contain only the names of these images.
Importing and Exporting Images Using the Image URL
By default, when the products are imported using the Product Import Export plugin, the exported CSV contains the URL path of the product image. If there are multiple images associated with the product, the URLs of the images are added in the CSV separated using the ‘|’ character.
During the import process, images are fetched from the location specified in the URL path from the CSV and associated with the product on the WooCommerce website. If a product has multiple images specified in the CSV file, all these images are fetched; the image from the first URL is taken as the product image and the rest of the images are added into the product gallery.
How to Import?
While using the default method(Export Images as Zip file option set to no), the products can be imported by simply uploading the CSV file. You can refer to this article on how to import the products and its associated images.
The Export Images as ZIP File Option
This option provides you with a different method for importing and exporting the images linked to the products. When this option is chosen, the exported CSV will include only the names of the images of the products instead of the entire path/URL. To link the products with their corresponding images, all the images that are related to the products being imported will be downloaded to a zip file.
The Export Images as Zip file option is set to no by default. So if you do not want to export the images in a separate file, you leave the field as is and go ahead with the export.
When you choose yes, click on the Export Product’s Images button to download the images in the zip file. After downloading the zip file you can export the products in a CSV file.
So, when you have opted for this option, you will get two files after the export. One will be the zip file of the images and the other will be the CSV file containing the product data. Everything else works the same except for the image path in the images column where the CSV file will contain only the name of the images.
How to Import?
First, dump the zip file into the media library. It is important that the zip file including the images be uploaded first to the media library before the product export. This is because, for the images to be linked with the products at the time of the import, the images have to be present in the media library when the CSV with the name of the product images is being imported.
After the zip file has been uploaded, the CSV with the products and the product data can be imported by uploading the CSV file into the plugin.
Why Choose this Option?
Normally, when the CSV file uses the URL path of the images to while importing, the plugin fetches the images from the given path in the server and then adds it to the WooCommerce store. This a fairly time-consuming process and the time taken in the process can be vastly affected by the network conditions swell. Also, when the number of products is large, in the order of hundreds or thousands, it takes a considerable amount of time to import all the data in the CSV file to the shop in this manner.
When the images are downloaded as a zip file, the CSV file only contains the name of the images. So there is no need for the plugin to actually go and fetch the images from the server path. The images can be associated with the products with the name of the image in the CSV and the images in the zip file. Since there is no fetching of the images from the URLs, the files will be imported very quickly, saving a considerable amount of time.