Remove 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

Images With Ugly Titles

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

  • Install and activate Image Attributes Pro
  • Head over to the Bulk Updater Settings tab.
  • Under General Settings, select Update Image Title. You can enable or disable other attributes as you please.
  • Under Image Title Settings select Use custom attribute and leave the text area blank. Save settings.
  • For Bulk Updater Behaviour of Image title, select Update all image titles in media library and posts. This will ensure that existing image titles are removed.
  • Switch to Bulk Updater tab and click Run Bulk Updater.
Image Title Selected To Be Updated
Bulk Updater configured to update only Image Title.
Bulk Updater Configured For Empty Image Titles
Bulk Updater configured to delete all image titles.

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.