Skip to content
Neartool
Checking…

WooCommerce Bulk Alt Text CSV: Worksheet and Limits

WooCommerce's own product CSV importer cannot add or update alt text for product images, so a CSV import alone will not set it. Use the Neartool file as a worksheet: match each row to a product by SKU, then apply the text through the media library, WP-CLI or a plugin.

Sample file

Three sample rows from the WooCommerce export. SKU is blank because Neartool cannot know it.

SKU,Images,Image Alt Text
,REPLACE_WITH_IMAGE_URL/oak-cutting-board.jpg,Rectangular oak cutting board with a rounded handle hole
,REPLACE_WITH_IMAGE_URL/cotton-apron-navy.jpg,Navy cotton apron with two front pockets on a hanger
,REPLACE_WITH_IMAGE_URL/ceramic-teapot.jpg,White ceramic teapot with a bamboo handle and matching lid

Steps

  1. Generate alt text for your product photos and read every line.
  2. Choose the WooCommerce CSV export and open it in a spreadsheet.
  3. Fill in the SKU column with each product's SKU so you can match rows to products.
  4. Find each image in the media library, or by product, and paste the alt text into its Alt text field.
  5. For many images, use WP-CLI or an alt text plugin on a staging copy first, then repeat on the live store.

Start with the Alt text generator, then check the text with the alt text checker.

What the core importer cannot do

WooCommerce's documentation for its product CSV importer and exporter states that the core importer cannot add, edit or update alt text for product images. It can attach images to products by address, but it does not read an alt text column. That means an Image Alt Text column in a file you import is ignored by core.

For that reason the Neartool file is not an import file. It is a tidy list of image, alt text and SKU that you or a script can work through. Treat it like notes you can sort and filter, not like a template you upload.

Matching rows to products

WooCommerce matches imported rows to existing products by ID or SKU. The SKU column in the Neartool file is blank on purpose, because the tool only sees your photos and file names. Fill it in from your product list. If your file names already contain the SKU, a spreadsheet formula can extract it.

Once each row has a SKU, you can look up the product in WooCommerce, open its gallery and see which image each line belongs to. Keep the file name too, since gallery images are often renamed on upload.

Three ways to apply the text

By hand: open the media library, click an image and fill in the Alt text field. This is slow but safe, and it works for a few dozen images.

With WP-CLI: product images are ordinary WordPress attachments, and their alt text is stored in the _wp_attachment_image_alt meta field. A command such as wp post meta update followed by the attachment ID and the text sets it. Looking up the attachment ID from a file name needs a query, so test your script on a copy of the site.

With a plugin: several plugins can import alt text from a spreadsheet. Check that the plugin is maintained, read its documentation for the expected columns, and try it on staging before running it on your shop.

Quality before quantity

Describe the visible product, not the marketing copy. Gallery images should say what each angle shows. Neartool's drafts come from a small on-device model, so check colours, materials and counts against the real product before you publish.

Limits and facts

Limits and facts for WooCommerce Bulk Alt Text CSV: Worksheet and Limits
Core importer and alt textCannot add or update it (WooCommerce docs)
Row matching in the importerBy product ID or SKU (WooCommerce docs)
Columns in the Neartool fileSKU, Images, Image Alt Text
Placeholders to replaceSKU and the image address in Images

Frequently asked questions

Can WooCommerce import alt text from a CSV?

Not with the core importer. WooCommerce's documentation says it cannot add, edit or update alt text for product images. A plugin or a script is needed.

Then why does the export have an alt text column?

So you have the text, the file name and a place for the SKU in one sheet. Use it to apply the text by hand, with WP-CLI or with a plugin.

How are CSV rows matched to existing products?

By product ID or SKU. That is why the SKU column is there. Neartool leaves it blank because it cannot see your catalogue.

Where is alt text stored in WordPress?

Image alt text is saved as the _wp_attachment_image_alt meta value on the image attachment. WP-CLI can set it with the post meta update command, using the attachment's ID.

Is it safe to bulk update alt text?

Take a backup and test on a staging copy first. Check a sample of products afterwards to make sure the right image received the right text.