---
title: "Bulk Import Images from URLs into the WordPress Media Library"
url: "https://wpimportexport.com/bulk-import-images-from-urls-wordpress-media-library/"
description: "Import a CSV of image URLs into the WordPress Media Library with titles, alt text, captions and thumbnails, and see which URLs failed to download."
type: post
published: 2026-11-12T07:00:00+00:00
modified: 2026-11-14T10:43:55+00:00
categories: ["Import Guides", "Tutorials"]
tags: ["CSV import", "Import Export by RockStarLab"]
docs_topics: ["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](https://wordpress.org/plugins/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](https://wpimportexport.com/wp-content/uploads/2026/11/01-mapped-fields-1.webp)

_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](https://wpimportexport.com/wp-content/uploads/2026/11/02-import-errors.webp)

_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](https://wpimportexport.com/wp-content/uploads/2026/11/03-media-library.webp)

_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](https://wpimportexport.com/how-to-create-a-wordpress-website-backup-and-restore-it/), 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](https://wpimportexport.com/connect-claude-code-to-wordpress-mcp/)) 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.

## Related Guides

- [How to Export the WordPress Media Library to CSV or Excel](https://wpimportexport.com/export-wordpress-media-library-to-csv-excel/)
- [Import WooCommerce Product Images from URLs (CSV)](https://wpimportexport.com/import-woocommerce-product-images-from-urls/)
- [Find Large Images in the WordPress Media Library](https://wpimportexport.com/find-large-images-wordpress-media-library-file-sizes/)
- [Sync Featured Images and Media Between WordPress Sites](https://wpimportexport.com/sync-featured-images-media-between-wordpress-sites/)

Get the free plugin on [WordPress.org](https://wordpress.org/plugins/import-export-by-rockstarlab/).
