External Variation Images & WP All Import

WP Intense Q & ACategory: External ImagesExternal Variation Images & WP All Import
Kyle Iverson asked 2 months ago

Hi Dave,

1) I created a custom field called 'external_image_url' in WP All Import and images are importing. Most are under the same met_key that was created, but some are added under '_external_image_url'.

2) Variation images aren't importing. I manually added an external image url to a variation and can see in the database that it used the met_key '_external_image_url', but variation images don't seem to be working with WP All Import.

Everything else is setup correctly, as I was using an alternative plugin to import external images.

2 Answers
Kyle Iverson answered 2 months ago

Please ignore. Everything seems to be working fine now.

Dave Hilditch Staff answered 2 months ago

To clarify on the meta fields:

external_image_url is the field you import to. This is ideally pipe | separated list of image URLs, but it can also be comma separated. Preferably pipe though because some images on some CDNs will include commas.

The first of those images is loaded into the _external_image_url field as an image array.

The gallery images (everything after the first image from external_image_url) are loaded into the _ei_wcgallery field as an array of arrays. This approach makes it fast to pull those arrays in the correct format needed for WordPress.

If you later update the external_image_url field, there is an action hook added to update_post_meta and delete_post_meta which will rebuild the hidden _external_image_url and _ei_wcgallery fields.

So – basically, don’t import to the hidden fields – just import to the external_image_url field with pipe separation between image URLs and the plugin will handle the rest. That’s the same for everything – products, product variations, posts, custom posts etc.

If you are using custom posts, the custom posts need to declare gallery support in order for the gallery to work in custom posts.

Also – there is a bug in the currently live version when editing an existing custom post gallery – it won’t apply the changes currently – this is fixed in beta which is in your downloads area in My Accounts.

Subscribe!

We publish performance optimisation guides regularly.

Subscribe so you never miss out.

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.