Woocommerse product images don\’t import from xml

Pending

Import WP Pro Updated 1 week ago 16 Replies

NIKOLAOS asked 5 months ago on May 30, 2025 at 8:24 am

Dear ImportWP Support Team,

I am experiencing issues importing WooCommerce products with images using an XML feed. I have followed the instructions in your tutorials for importing WooCommerce products with images from XML, but the images are not being imported.

Below I am sendind you my xml structure:

  • <record>
    • <product>
      • <product_id>
        • 1.38.80.15.005
      • <title>
        • Razer Bottle Opener
      • <images>
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/img9348-1_edited.jpg
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/Razer-Bottle-Opener.jpg
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/264-1_razer-bottle-opener-1.jpg
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/CHUSxv_g.jpeg
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/img9348-1_edited.jpg
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/razer_bottle_opener_1566100959_707b77df_progressive.jpg
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/xS8HLIeQ_edited.jpg
        • <image>
          • https://b2b.zegetron.gr/wp-content/uploads/2025/05/c81617346e16baf8524eeb3f5af86194.jpg
      • <part_number>
        • RS21-00850114-0000
      • <manufacturer>
        • Razer
      • <recycling_fee>
        • 0,00
      • <category>
        • pos materia
      • <price>
        • 7,25
      • <suggested_retail_price>
        • 9,99
      • <barcode>
        • 5204258095572
      • <youtube_id>
        •  
      • <stock>
        • 160
      • <availability>
        • Available
      • <description>
        • Το τέλειο δώρο – ένα στυλιζαρισμένο ανοιχτήρι μπουκαλιών, με μεταλλική αλυσίδα. Το ανοιχτήρι έχει σχήμα dog tag και χάραξη με το σήμα της Razer. Το απαραίτητο αξεσουάρ για κάθε gamer.
      • <weight>
        • 40
      • <width>
        • 0,30
      • <length>
        • 7,00
      • <height>
        • 4,00
      • <skroutz>
      • <pcs_per_carton>
        • 0
      • <country_of_origin>
      • <hs_code>
        • 39264000

Based on the structure of my XML feed, I have configured the \\\\\\\”Product Gallery\\\\\\\” section in ImportWP as follows:

  • Repeater Node: /record/product/images
  • Location: /image
  • Is Featured?: Yes
  • Download: Remote URL
  • Base URL: (Empty)
  • Permissions: Always download new files (or Search media library before downloading new files)
  • Delimiter: (Empty)
  • Enable Meta: Yes (with Title Text: /record/product/title and Description Text: /record/product/description) OR No

I have also ensured that the \\\\\\\”Product Gallery\\\\\\\” section is correctly linked in the \\\\\\\”Setup Fields\\\\\\\” tab.

The import process completes without any specific errors related to images in the import history, but the product images are not attached to the imported products. The import history typically shows messages like:

Record Inserted: # [Product ID] (ID, post_title, post_content, post_status, _sku, _global_unique_id) (other product fields) using unique identifier (\\\\\\\"[Product Unique Identifier]\\\\\\\")

The URLs to the images in the XML feed are valid and accessible in a web browser.

Could you please assist me in identifying what might be preventing the images from being imported correctly? I can provide further details about my ImportWP settings or a sample of my XML feed if needed.

 

Thank you for your time and support.

J

James replied Support Agent

5 months ago on May 30, 2025 at 8:34 am

Hi Nikolaos,

Can you please export and attach your importer settings to this ticket by going to Tools > Import WP > Settings / Tools > Import / Export and select and export your importer as a JSON file.

Can you also attach your xml file.

James

 

NT

NIKOLAOS replied privately

5 months ago on May 30, 2025 at 8:58 am

J

James replied Support Agent

5 months ago on May 30, 2025 at 11:24 am

Thanks for the files, 

Looking at your importer, the first issue i see is you have set the product ID to {/product_id} , this is the number of the product in wordpress, the value in your xml file is invalid, i would recommend disabling this field.

Since you are using the same value for the sku field, and i guess this is an unique identifier, i would also recommend on the "4. permissions" step change the unique identifier field to "Select a template field to be used as the unique identifier for each record.", and select "_sku" from the list. (this means it will search your products by the {/product_id} value, and update or create a product). Currently you have it only searching imported product based on the xml value.

To fix the images not importing, you should remove the selection you have chosen for the "Repeater Node", and then update the location to "{/images/image}" (repeater node is only needed when you are fetching more than one tag from the xml, in your case your are only fetching the /image tag).

Screenshots attached of the relevent sections.

Hope this makes sense

James

NT

NIKOLAOS replied

5 months ago on May 30, 2025 at 8:24 pm

That works, thank you very much.

I have another question, how can I import products from xml file to the categories that I have create for my shop? Can I do it with taxonomies? Can I merge xml and my categories in one? And if yes,how can I do it?

Thanks again for your support.

J

James replied Support Agent

4 months ago on June 1, 2025 at 8:36 pm

Hi,

Yes you can import products to categories via the taxonomy section, there should be a taxonomy called "product category" (https://www.importwp.com/docs/how-to-import-wordpress-taxonomies-onto-a-post-type/).

James

NT

NIKOLAOS replied privately

4 months ago on June 3, 2025 at 9:19 am

J

James replied Support Agent

4 months ago on June 3, 2025 at 9:43 am

Hi Nikolaos,

From your screenshot i can see you have setup the filters using the "and" button, this means that the record will be skipped if the category node equals "3D Printer Filaments" and "Gaming Chairs" and "3D Printer Resins" and ... , which will never match.

Instead you need to use the "or" button at the bottom (it means that if the text equals: "Gaming Mouse" Or if it equals "3D Printer Filaments", or if it equals "Gaming Chairs" then it will be skipped which is what i think you require ), i have attached a screenshot of how this looks once done, using Gaming Mouse, 3D Printer Filaments, Gaming Chairs as an example.

James

NT

NIKOLAOS replied privately

4 months ago on June 15, 2025 at 8:45 pm

NT

NIKOLAOS replied privately

2 weeks ago on September 30, 2025 at 9:37 am

J

James replied Support Agent

2 weeks ago on September 30, 2025 at 6:24 pm

Hi,

Looking at your config, you have the product gallery location is set to {/images}, comparing this agianst the feed it would not work, as the feed now has it as {/images/image}.

Once you have updated that please let me know how you get on.

James

NT

NIKOLAOS replied privately

2 weeks ago on October 3, 2025 at 12:05 pm

J

James replied Support Agent

1 week ago on October 3, 2025 at 10:38 pm

Can you share the error you get?

NT

NIKOLAOS replied

1 week ago on October 4, 2025 at 4:52 am

Its not  a specific error. when i run the import it shows errors ,skips products and it freezes as you see in the last photo. It shows that runs but gets stuck there .i cant understand  why it does that and  goes so slow and stucks. also i would like ask how can i includde the attibutes that this xml has,it has a category in the products.i tried to import them  from attributes  but it didnt work.. is everything right in rhe way i have  included in this json?  Thanks again . everything else in other tickets has worked out..
J

James replied Support Agent

1 week ago on October 4, 2025 at 7:18 am

Based on your current importer config, you only have the create permission enabled, this would mean it would skip products that already exist with a matching sku (and would record this as an error in the history log as "Not enough permissions to update record".

I would recommend removing the rows under attachments section, and only keeping them in the product gallery section as you have duplicate setup.

i cant see the errors you are talking about can you please re-attach a screenshot of the importer history logs relating to these errors, and a screenshot of the log overview.

There are many reasons that can cause a slow import, it can be down to server power, other plugins installed slowing operations down, to figure this out you would need to install on a fresh setup wordpress, woocommerce and the importer create a database backup. And then run it to get a baseline speed, then install it again, revert the database back to the previous state and install all plugins and theme and run the importer again to compare, then try to isolate what is causing the slowdown.

I have ran the importer locally with from your config, and the main slow down of the importer is downloading the images and depending on how many image sizes your theme has to generate can be a massive factor in slowing down the import (as in the first couple of images i can see a 25MB image this can stall/freeze the interface of the importer while the download is happening).

You have no attribute settings in the config, and looking at the xml it has an attributes node with a whole bunch of text in a single field, i can create something to parse this into seperate woocommerce attributes, but i would rather make sure everything else is working before doing this.

 

NT

NIKOLAOS replied

1 week ago on October 5, 2025 at 10:49 pm

 Dear James,

Thanks for the help so far.At first, I deleted all products with the same SKU from another supplier so there would be no conflicts with existing records, and I also removed the lines under the <attachments> section as you suggested. When I tried importing the products without images, everything worked fine. However, when I later attempted to update the products only to add the images, the process became very slow and in most cases it did not complete, even if I selected just a single image for import. What is strange is that this issue only happens with this specific XML feed, because with my other four XML imports, images are imported without any problem.

 

I would also like to ask if there is a way to assign a custom field to products that would not be visible on the frontend but only in the backend, so I can easily identify from which supplier each product originates.

 

Finally, I would like to know what is required in order to import the attributes exactly as they are grouped in the XML file, so that WooCommerce automatically creates these attribute groups during the import process.

 

Thank you again for your support and I look forward to your guidance on this.

J

James replied Support Agent

1 week ago on October 6, 2025 at 1:33 pm

Thank you for the info.

Yes the speed sounds like the server you are downloading the images is slowing the import down.

Yes you can add custom fields visual with plugins like ACF, pods or any custom field tool in wordpress. The importer can easily import into custom fields via the custom fields section of the importer template, just type the name of the field and set the value and the data will be imported.

Let me get back to you on the attributes as i will look into writing something custom for this as you would normally expect each attribute to be a name and value under the attributes node, but in your case it is just a single node with all the attributes output as text, more of a description.

James