How to alter import jobs to import external images

Our External Images plugin alters WordPress to allow you to use featured images and image galleries that are hosted off-site, often on an affiliate CDN, sometimes on Amazon S3.

There are two reasons why this is desired – the first being the vast reduction in storage requirements for your server and the second being significant speed boosts for import jobs.

When you import products or posts that included featured images, WordPress loads the full size image to your uploads folder but it also creates multiple resized copies of this image, depending on how many image sizes you have registered on your website. This uses CPU and disk.

How to alter import jobs

The essentials are very simple. Do not import ‘featured images’ or ‘gallery images’ using the normal images feature of your import tool. Instead, you map these fields from your import to a meta field called external_image_url. This meta field can contain multiple images separated by the pipe | symbol and the first image will become your featured image.

Here’s an example using WP All Import – in the image below, you’ll see the typical set up where images are configured to be downloaded to your server.

So – in the example above, the source field in the import is {imageurl[1]}. To update this import job to work with External Images, you simply delete this {imageurl[1]} from the Images import and put the {imageurl[1]} into the Custom Fields area below it.

Now when you run your import, WP All Import will treat your {imageurl[1]} field like a standard text custom meta field and will not process the images. The External Images plugin will spot that this external_image_url field is populated and will use it to create your featured images.

Did this article answer your question?

Leave a Reply

Your email address will not be published. Required fields are marked *