Back to blog
5 min read Import Guides

Bulk Import Images from URLs into the WordPress Media Library

Moving a blog, taking over a client’s site or collecting photos from a supplier often starts with a list of image addresses. Uploading them one by one through Media → Add New takes an afternoon and still leaves the alt texts empty. Import Export by RockStarLab imports a CSV or Excel file of image URLs into the Media Library: it downloads each file, creates the thumbnails and saves the title, alt text, caption and description from the same row. In the example, six photos move from a coffee roastery’s old blog.

Free: everything in this guide works in the free plugin.

Short Answer

  1. Prepare a file with an image URL column and, optionally, Title, Alt Text, Caption and Description.
  2. Go to Import Export by RockStarLab → Import, choose Media and upload the file.
  3. Map the URL column to File URL and the other columns to their fields.
  4. Run the import. Rows whose image can’t be downloaded are listed with the reason.

The file

Image URL,Title,Alt Text,Caption,Description
https://old.example-roastery.com/wp-content/uploads/old-blog/opening-day-storefront.jpg,Roastery front,Front of the roastery with the new sign,Our roastery on opening day,Exterior photo for the opening announcement.
https://old.example-roastery.com/wp-content/uploads/old-blog/huila-farm-sorting.jpg,Farm visit,Sorting green coffee beans at the farm,Sorting beans in Huila,Taken during the 2025 harvest trip.
https://old.example-roastery.com/wp-content/uploads/old-blog/yirgacheffe-cupping-bowl.jpg,Ethiopia Yirgacheffe,Washed Ethiopia Yirgacheffe beans in a cupping bowl,,
https://old.example-roastery.com/wp-content/uploads/old-blog/weekly-cupping.jpg,Cupping session,Baristas cupping six coffees at the tasting table,Weekly cupping,
https://old.example-roastery.com/wp-content/uploads/old-blog/roaster-cooling-tray.jpg,Roasting machine,Coffee beans cooling in the roaster tray,,
https://old.example-roastery.com/wp-content/uploads/old-blog/espresso-bar.jpg,Espresso bar,Espresso bar with two grinders,,

Each URL must be public and point to the image file itself, not to a page that shows it. Empty cells are fine. The last photo had been deleted from the old site, which we left in on purpose.

Map the columns

Auto Map matched Title, Alt Text, Caption and Description. We dragged Image URL to File URL:

Mapped Fields for a media import: Title to post_title, Alt Text to alt_text, Caption to post_excerpt, Description to post_content, Image URL to file_url
Map the URL column to File URL; the other fields come along.

In WordPress terms, the caption is stored as the excerpt and the description as the content, which is why the right-hand side shows post_excerpt and post_content. On the next step we kept Check for Existing Items by Field on Title with Update, so running the file again updates the same images instead of adding copies.

Run the import

Import Completed with Errors: 5 images created, 1 failed; Row 6: Failed to download file. HTTP status: 404, with a hint and a Download rows with errors (CSV) button
Five images imported; the missing one is listed with the reason.

Five images were downloaded in 9 seconds. Row 6 failed with HTTP status 404, the server’s way of saying the file isn’t there. Download rows with errors (CSV) gives you that row to fix and import again; the same list is in Jobs Log.

Check the Media Library

Media Library list with the imported images Roasting machine, Cupping session, Farm visit, Ethiopia Yirgacheffe and Roastery front and their file names
The images arrive with their titles and thumbnails.

Each image has its title, alt text, caption and description, and WordPress created the usual thumbnail sizes, so the images are ready for posts and galleries. The file kept its folder from the old site’s uploads path (old-blog/), which makes it easy to replace old image links later with Replace links on the import options step.

We imported the same file a second time: the five images were updated, not duplicated, and no extra files appeared in the uploads folder.

Before you import

A large image import fills the uploads folder and the database quickly. Back up the site, check that the hosting has enough disk space and try the first ten rows before the whole file.

With an AI agent

An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can tell you which images didn’t come through:

Which images from the last media import failed, and why?

In our run, the agent called rsl-ie/job-list for the latest import (6 rows, 5 succeeded, 1 failed) and rsl-ie/job-errors, which returned row 6, “Failed to download file. HTTP status: 404”, with the hint to open the URL in a browser and check that it returns the file itself.

FAQ

Can I import images from Excel instead of CSV?

Yes. The importer reads CSV, Excel (.xlsx), JSON and XML files.

Are thumbnails created?

Yes. WordPress creates the same sizes as for an image uploaded by hand.

What happens if an image URL doesn’t work?

That row fails with the HTTP status or error, the other rows are imported, and you can download the failed rows as a CSV.

Will importing the same file twice create duplicates?

No, when Check for Existing Items is set to a field like Title with Update. The second run updates the images.

Can I attach the images to posts?

Yes. Map a post ID to Attached To. To set featured images on posts, import the posts with a Featured Image URL column instead.

Get the free plugin on WordPress.org.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

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

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE