Importing a WooCommerce product gallery really just means importing multiple images to WooCommerce products or product variations. There is nothing magical about it, but the devil is in the details.
The details in this case involve three key factors:
We'll walk you through each of these issues. To follow along, use this online Sandbox and choose the WooCommerce Store option.
To start, we'll create a new product import and bring you to the point where you have to make decisions about how to handle your images.
Navigate to All Import › New Import in the main WordPress menu, upload your import file, then choose New Items › WooCommerce Products as the import post type.
Click the blue Continue to Step 2 at the bottom.
The Review Import File screen will appear next. Here, just check to make sure that the data in the import file looks correct.
Once you've done this, click Continue to Step 3.
Next up is the Drag & Drop screen, where you map the incoming data to the corresponding WooCommerce fields.
Begin by mapping the incoming title and description data elements to the relevant fields in the Title & Description section.
Expand the WooCommerce Add-On section and map those fields, too. For more information on how to do this, see WooCommerce Add-On Section.
In this article, we're going to focus on the Images section, where you specify how to import your product images.
Let's now examine the three key issues described at the beginning of this article.
There are five potential types of sources for images. The first three can be addressed using the options at the top of the preceding image:
There are also two other options. One is contained in the Image Options section of the preceding image:
Finally, you can use custom code to import images stored on an FTP or FTP site. See Workaround for Importing from FTP for more details.
In the preceding image, there is an edit box associated with the Download images hosted elsewhere option. To import multiple gallery images per product using this option, you have two choices. If the incoming data has more than one image per product but stores those images in separate data elements, you can include all of those elements in this box:
The other possibility is that one incoming data element contains multiple images that are separated by a character. In this case, you just drag that incoming data element into the edit box and specify the image separator in the ...or separate them with a field, as follows:
In this example, all the images are stored in the image_url data element, and the separator character is a comma.
These same mechanisms apply to the Use images currently in Media Library and Use images currently uploaded in wp-content/uploads/wpallimport/files/ options.
By comparison, the Scan through post content and import images wrapped in <img> tags option does not require similar settings because, by default, it imports all the images it finds wrapped in the <img> tags and adds these to both the Media Library and the associated products.
Finally, note that the SEO & Advanced Options subsection of the Images section uses the exact same approach regarding multiple images per product:
By default, variable products only allow one image per variation. However, these two plugins let you modify this behavior.
Once multiple images per variation are permitted, you can then import them by enabling the Import additional variation images option shown at the bottom of this page.
To complete your product import, click the Continue to Step 4 button at the bottom of the Drag & Drop interface (not shown).
This will bring you to the Import Settings screen. There are many key settings on this page, but for this example, just click on the Auto-detect button to generate a unique identifier automatically, then click Continue at the bottom of the page.
In the Confirm & Run screen, just click Confirm & Run Import.
When the import completes, you should see a screen similar to this:
Finally, navigate to Products › All Products to verify that your import worked as expected, especially for the product gallery images!
If your product gallery images didn't import properly, do the following: