Back to blog
4 min read Import Guides

Bulk Add Image Captions and Descriptions in WordPress from a Spreadsheet

Image captions and descriptions are easy to skip when photos are uploaded in a hurry. The caption is the short line WordPress offers under an image when you add it to a post, and the description is a good place for photo credits and notes on where the image is used. With Import Export by RockStarLab you can export the images that have no caption, write the captions and descriptions in a spreadsheet, and import them back in one go. The example uses eight photos of a coffee roastery.

Free: Media export and import, including caption and description.

Short Answer

  • Export Media with the filter Caption Is Empty and the columns ID, File Name, Title, Caption and Description.
  • Fill the post_excerpt (caption) and post_content (description) columns, then keep only those two and ID.
  • Import the file into Media with Check for Existing Items by Field set to ID, Update for matches and Skip for new items.

1. Export the images without a caption

Go to Export, choose Media and add the filter Caption, Is Empty. We added a second filter, Upload Date Equals the day the roastery photos were uploaded, and the counter showed 8:

Export Media with filters Caption Is Empty and Upload Date Equals 05/11/2026, 8 items
Find the images without a caption.

On the field step we chose ID, File Name, Title, Caption and Description and exported a CSV. In the file, the caption column is called post_excerpt and the description column post_content, which are the names WordPress uses for these fields:

Export columns ID, File Name, Title, Caption (post_excerpt) and Description (post_content)
Caption and Description are post_excerpt and post_content.

2. Write the captions and descriptions

Use the file name and title to recognize each photo, or keep the Media Library open next to the spreadsheet. We wrote a short caption and a credit line for each image. Before the import we deleted the File Name and Title columns, so the file had three columns:

ID post_excerpt (caption) post_content (description)
1862 Picking ripe cherries with the Mukami family, Nyeri, Kenya Photo: Example Roastery, origin trip 2025. Free to use with credit.
1860 Kenya Nyeri AA, washed: blackcurrant, grapefruit, cane sugar Product photo for the Kenya Nyeri AA bag, 250 g.
1853 Our 15 kg drum roaster during a light roast Photo: Example Roastery. Used on the About and Wholesale pages.
1852 The roastery café on Harbour Street Photo: Example Roastery. Used on the Contact page.

The table shows four of the eight rows.

3. Import the captions

Go to Import, choose Media, upload the CSV and click Auto Map. The three columns were mapped to ID, Caption and Description:

Media import mapping: ID to ID, post_excerpt to Caption, post_content to Description
Auto Map matches the three columns.

On the options step, set Check for Existing Items by Field to ID, If Match Found to Update and If No Match Found to Skip:

Import options: check existing items by ID, update matches, skip items without a match
Update by ID and skip unknown IDs.

The import updated all eight images in two seconds, with nothing created:

Import Completed Successfully: 8 updated, 0 created, 0 failed
All eight images were updated.

4. Check the result

Open an image in the Media Library. The Image Caption and Description fields show the imported text, and the title, the file and the upload date stayed the same:

Attachment details of roasting-machine.jpg with the imported caption and description
The caption and description in the Media Library.

When you add the image to a post from the Media Library, WordPress fills in the caption from the library. Images already placed in posts keep the caption saved in the post, so this import doesn’t change them.

Before you import

The import changes the Media Library. Keep only the ID and the columns you want to change, check the IDs, and back up the site before you update many images. Alt text can go into the same file: add the alt_text column, as described in adding image alt text from a spreadsheet.

With an AI agent

An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can check the result:

Show the captions and descriptions of the roastery photos.

In our run, the agent called rsl-ie/export-preview for media with the fields ID, file name, caption and description and the eight image IDs. It returned all eight images with their new text, for example roasting-machine.jpg with the caption “Our 15 kg drum roaster during a light roast”.

FAQ

Which columns hold the caption and the description?

post_excerpt is the caption and post_content is the description. In the export wizard they are listed as Caption and Description.

Will the import change the image files or titles?

No. With only ID, caption and description in the file, the file, title and upload date stayed the same in our test.

Does this change captions in existing posts?

No. Images in posts keep the caption saved in the post. The library caption is used when you add the image again.

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