Remove / Replace Image Titles From All WordPress Images In Bulk

If you haven’t been too careful with your blog from the beginning, you might have images with random image titles that show up when users hover over the images.

It doesn’t look very good and now you want to hide the tool tip text that shows up when you hover on your images

An Image With Random Image Title

Some slider plugins also use the image titles and use them as the name of the image. 

Deleting all image titles for all the images of your WordPress website is not an easy task of course. But somehow it needs to be done. 

Where Does WordPress Store Image Titles

For every image attribute, including image titles, WordPress stores them in two places.

  • One in the Media Library.
  • Another copy in the HTML of the post.
Image Title In Media Library
Image title stored in the Media Library.
Image Title In Post Html
Image title stored in the HTML of the post.

Deleting image titles in the Media Library does NOT automatically update the image title stored in the post HTML.

Typically if you are trying to delete image titles, you need to delete the copy stored in the posts. Let’s look at some ways to do that.

Hiding Image Title Using functions.php

While this approach is not exactly “removing” titles, it should still work for many use cases. WordPress provides a filter the_content with which you can “edit” content at run-time.

  • If all that sounds gibberish to you, go ahead and add the following code into the functions.php of your active theme.
  • If you use a caching plugin, clear the cache.
  • Check the website to see if titles are removed.
/**
 * Remove image titles from WordPress 
 * 
 * @author Arun Basil Lal
 * @link https://imageattributespro.com/bulk-remove-wordpress-image-titles/
 * 
 * @param $content string Content of current post.
 * 
 * @return $content string Current post content with titles removed. 
 */
function prefix_iap_remove_image_titles( $content ) {
	
	// \s prevents matching data-title="" attributes. 
	preg_match_all('/\stitle="[^"]+"/', $content, $matches );
	
	// Replace title="" with empty string.
	foreach( $matches[0] as $image_title ) {
		$content = str_replace( $image_title, '', $content );
	}

	return $content;
}
add_filter( 'the_content', 'prefix_iap_remove_image_titles' );

Bulk Delete All WordPress Image Titles From Posts, Pages And Products

The functions.php approach above might not be sufficient for certain use cases. Some slider plugins or themes might be pulling the image title from the database.

To properly clear image titles in the database, you need Image Attributes Pro. (Of course, I am writing about my own plugin, it’s the best tool I know! I built the plugin for uses like this.)

With the version 2.0 release of Image Attributes Pro, its super easy to get rid of the image titles in bulk. Let’s see how to configure Image Attributes Pro so that it can delete all image titles from all your images

Step 1: Configure Image Title Settings

In the Advanced tab of Image Attributes Pro, you will find Image Title Settings. Leave it blank like in the screenshot below.

Image Title Settings Configured To Be Empty

Step 2: Configure Bulk Updater Settings

Head over to the Bulk Updater Settings tab.

  • Under General Settings, select Update Image Title.
  • For Image Title Settings, select to Update in both the Media Library and Post HTML.
  • Also select, Update all attributes overwriting any existing attributes, so that existing image titles are overwritten with a blank attribute.
Image Title Settings Configured To Overwrite Existing Attributes

Step 3: Run Bulk Updater

Switch to Bulk Updater tab and click Run Bulk Updater.

Run Bulk Updater 4.3

Important: Take a full database backup before you proceed and remember to use the Test Bulk Updater button to make sure the result is as you like.

Removing Image Titles Bad For SEO?

Many SEO experts suggest having both image alt text and image title to be used for best results. Search engines will rely on both these attributes if available to understand your image.

If you think about it, ideally Image Title is meant to be seen by the visitor. So it is likely that it will be more descriptive and accurate. From the perspective of search engine, relying on image titles make a lot of sense.

So should you be removing image titles? Better not.

Why are you removing image titles in the first place? Is it because the image titles you have right now are not appropriate?

Image Attributes Pro can replace then with better image titles by generating appropriate titles from your post / product title or from the image filename. You can also build your own image title using custom tags like %filename%, %posttitle%, %sitetitle%, %yoastfocuskw%, %rankmathfocuskw%.

Which Image Attributes Pro Plan Will Create Most Value For You?

If you are looking for a one-off solution and if the rest of your website has top notch Image SEO, then look no further than the “Personal” plan. Your problem will be solved in a few minutes and you can be on your way.

If you are a web developer or have multiple clients, the “Developer” or “Unlimited” plans would be more ideal. You can use the product on all your clients and do much more than just image titles. A “Lifetime” plan is also available if you are looking for a one time investment.

Checkout all Image Attributes Pro plans โ†’

I am on a journey to make Image Attributes Pro the best solution for Image SEO. Every plan will deliver “value” for years to come and you will be supporting an independent developer in the process. Thanks in advance for your purchase.

Video Guide

Was this article helpful?
Yes, thanks! ๐Ÿ‘Not really ๐Ÿ‘Ž