Skip to main content
Updates / How to Import a WooCommerce Product Gallery (Multiple Images & Variations)
← All updates
 
Blog

How to Import a WooCommerce Product Gallery (Multiple Images & Variations)

Importing a WooCommerce product gallery means attaching multiple images to a product in addition to its featured image. Product galleries let shoppers see alternate angles, close-ups, and other product details that can’t be captured in one image.

WooCommerce product gallery imports need to distinguish between featured versus gallery images, preserve their display order, and associate every image with the correct product or variation. Supplier feeds can make this difficult by storing multiple image URLs in a single field separated by commas or pipes, or by distributing images across multiple columns.

In this guide, I’ll show you how WooCommerce handles gallery data under the hood and how you can import product galleries automatically using WP All Import.

To understand how product galleries import into WordPress, you need to understand how WooCommerce stores media in the database.

WooCommerce distinguishes between two types of product imagery:

  1. The Featured Image (_thumbnail_id): The primary image displayed on catalog archive pages and as the lead photo on the single product page. A product can have only one featured image.
  2. The Product Gallery (_product_image_gallery): A secondary array of image IDs stored in the wp_postmeta table as a comma-separated string (for example, 1042,1043,1044). These appear as clickable thumbnails beneath the main product image and expand into lightboxes or carousels.

When you import a product spreadsheet, your gallery data typically arrives in one of three formats:

  • Delimited single cells: All secondary image URLs sit inside one table cell, separated by commas, pipes, or spaces (e.g., front.jpg|side.jpg|back.jpg).
  • Separate column headers: Each gallery photo has its own column in the spreadsheet (e.g., Gallery_Image_1, Gallery_Image_2, Gallery_Image_3).
  • Media Library filenames: The spreadsheet contains only filenames (e.g., shoe-side.jpg), which must match images pre-uploaded to WordPress or a server directory.

WP All Import handles all three layouts, converting external links or filenames into a structured WooCommerce gallery array automatically.

Step 1: Start a New Product Import with Automatic Setup

Navigate to All Import › New Import in your WordPress dashboard. Click the Set up automatically banner at the top of the screen to launch the setup wizard.

WP All Import automatic setup banner

Choose how to load your product file:

  • Upload File: Drag and drop your spreadsheet directly from your computer (supporting CSV, Excel, XML, or ZIP archives up to 256 MB).
  • Download from URL: Enter a live supplier image feed URL or a shareable Google Sheets address.
  • Existing File: Select a file previously uploaded to your server.
  • FTP/SFTP: Connect directly to remote supplier file storage.

Under Choose What to Import, select WooCommerce, then select Products (Simple, Variable, Grouped).

Click Start Automatic Setup. WP All Import analyzes the incoming spreadsheet columns, detects simple and variable products, identifies which columns contain image data, and builds the field mappings automatically.

When the background analysis finishes, WP All Import presents the Your Import Is Ready summary card. This card displays the detected product type, total record count, number of mapped fields, and an overall confidence score.

Your Import is ready WP All Import Automatic Setup

Scroll down to the Field Mappings list below the card to verify that your primary photo and gallery columns have been identified.

If your spreadsheet uses standard column headers and clean image URLs, your setup is already complete. You can proceed directly to running your import, or click Manual Import to inspect gallery delimiters and thumbnail ordering.

To inspect or adjust how WP All Import builds your product galleries, click Manual Setup to open the pre-filled template editor.

Scroll down and open the Images panel. Here is how to configure specific gallery layouts:

Importing Galleries from Delimited URLs

If your spreadsheet bundles multiple image URLs into a single cell, select Download images hosted elsewhere.

  1. Paste your image column tag (e.g., {images[1]}) into the edit box.
  2. In the field labeled …or separate them with a, enter the separator character used in your file (such as a comma , or pipe |).
  3. WP All Import automatically downloads each image, assigns the first URL as the featured image, and places all remaining URLs into the product gallery in sequential order.

Importing Galleries from Multiple Columns

If your supplier provides photos across separate columns, you do not need to combine them in Excel first:

  1. Select Download images hosted elsewhere.
  2. Drag each individual column tag (e.g., {image_front[1]}, {image_side[1]}, {image_detail[1]}) into the edit box, placing each tag on its own line.
  3. The plugin processes the list from top to bottom, setting the top tag as the featured image and the subsequent tags as the gallery.

Matching Existing Media Library Images

If your photos are already uploaded to WordPress, select Use images currently in the Media Library.

existing media library images

Map the column containing your image filenames into the box. WP All Import searches your existing media attachments, matches the filenames, and links them directly to the product gallery without downloading duplicate files.

Critical Gallery Safeguards

The lower half of the Images panel contains essential controls for gallery management:

  • Prevent Duplicate Downloads: Enable Search through the Media Library for existing images before importing new images. You can match files by URL or filename. When WP All Import detects an existing file, it reuses the existing media ID in the gallery array instead of creating duplicate uploads.
  • Draft Status for Incomplete Galleries: Check If no images are downloaded successfully, create entry as Draft to prevent products with broken image links from appearing on your live storefront.
  • Image SEO Metadata: Expand SEO & Advanced Options to map spreadsheet columns directly to gallery Image Title, Caption, Alt Text, and Description fields.

Step 4: Preview Live Product Galleries Before Running the Import

Before committing records to your live database, verify how your product galleries look and function:

  1. Click Preview in the header of the template editor.
  2. Choose Frontend View in the preview modal.

The Frontend View renders an interactive product page displaying your full-resolution photos, thumbnail slider, and lightbox exactly as customers will see them.

Test the gallery controls:

  • Click secondary thumbnails to ensure the main image swaps properly.
  • Open the lightbox to confirm that images expand in high resolution.
  • For variable products, click variation dropdowns (like color or size) to ensure variation images update dynamically.

Use the arrow buttons at the top of the preview modal to step through different records. Once your galleries look correct, close the modal and click Continue to Import Settings.

The Import Settings screen controls how WP All Import matches records and manages recurring catalog updates.

Click Auto-detect to generate a Unique Identifier. This key (typically the product SKU or post ID) allows WP All Import to identify existing items during future updates.

Click Confirm & Run Import. WP All Import downloads the image files, generates responsive WordPress thumbnail sizes, constructs the _product_image_gallery database array, and displays an Import Complete summary showing created, updated, and skipped records.

How to Import Multi-Image Galleries for Product Variations

By default, WooCommerce core only permits one image per variation. If you sell a shirt in Blue and Red, WooCommerce lets you assign one photo of the blue shirt and one photo of the red shirt.

If your catalog requires a complete, multi-angle gallery for every variation (for example, four photos of the blue shirt and four photos of the red shirt), you must install a variation gallery extension, such as:

  • WooCommerce Additional Variation Images
  • Additional Variation Images Gallery for WooCommerce

When a compatible extension is active, open the Images panel in WP All Import and check the Import additional variation images option.

WP All Import recognizes the extension’s database fields and routes child image tags directly into the variation gallery rather than dumping them into the parent gallery.

How to Bulk Update Galleries on Existing Products

If you need to refresh product photos or add galleries to products that already exist in your store, you can update galleries in bulk without touching your titles, prices, or inventory counts:

  1. Go to All Import › New Import and upload your spreadsheet containing product SKUs and new gallery URLs.
  2. Select WooCommerce Products and click Start Automatic Setup.
  3. In the template editor, confirm that the SKU and Images panels are mapped.
  4. On the Import Settings screen, under the update rules, select Choose which data to update.
  5. Uncheck all boxes except Images.
  6. Under image update options, choose whether to append new images to the existing gallery or replace the existing gallery completely.
  7. Run the import. WP All Import matches products by SKU and updates the gallery arrays while leaving the rest of your catalog data untouched.

Frequently Asked Questions About WooCommerce Product Galleries

How do I import multiple images into a WooCommerce product gallery?

To import multiple images into a WooCommerce product gallery, enter your image URLs into a single spreadsheet cell separated by a character like a comma or pipe. In WP All Import, select WooCommerce Products, open the Images section, paste your image column tag, and enter your separator in the delimiter field. WP All Import sets the first photo as the featured image and places all remaining photos into the product gallery.

Can I import a gallery for product variations in WooCommerce?

Yes, but because WooCommerce core only allows one image per variation, you must use a compatible plugin like WooCommerce Additional Variation Images. Once installed, check Import additional variation images in WP All Import’s Images panel to link multi-image galleries to child variations.

How do you update product galleries without re-importing all product data?

To update product galleries on existing products, upload a spreadsheet containing your product SKUs and new image URLs to WP All Import. On the Import Settings screen, select Choose which data to update, uncheck all options except Images, and run the import. WP All Import updates the gallery arrays while keeping your existing titles, descriptions, and prices intact.

What is the difference between a featured image and a product gallery in WooCommerce?

The featured image (_thumbnail_id) is the primary photo used on archive shop pages and as the main display image on the product page. The product gallery (_product_image_gallery) is an array of secondary images displayed as clickable thumbnails below the main image, allowing shoppers to view additional product angles and details.

Get Oxygen

Build it your way with Oxygen.

$199.50 once — unlimited sites, no renewal

Not per year, not per site, not per seat. 60 day money back guarantee.