Resources     Blog  

  1. Home
  2. WordPress Tutorials
  3. How to Add Title Tags for Images in WordPress

How to Add Title Tags for Images in WordPress

Is your website overflowing with images without titles? Adding title tags or title attributes to your site’s images is easy and helps visitors know the name of their favorite pictures. This is especially useful for artists that are using their website as an online portfolio. Like most things in the world, giving your creations a name is important.

Image title attributes are very easy to add. There are two ways to add them. The first method is to go into the HTML editor and add them to your images. This will be necessary for images that are already on your website.

The second method is to use a plugin that will let you add title tags when you are choosing your images in the media library. Today I will demonstrate how to add title tags for images using three different methods.

Why Add a Title to an Image?

The main reason to add a title to an image is to give images on your website a name. If the image can only be found on your website, then the name may help create some brand recognition.

For example, if you have a portfolio website for your art, and you had an image called Mountain, visitors may start remembering your work by name.

Adding a name makes it easy for people to discuss work in the comments section or other places on the Internet. Having your work discussed in other places is almost always a good thing because most people will want to see the original if they see other people talking about it or making references to it.

How to Add Title Attribute For Images in WordPress

Today I will demonstrate how to add title tags for images using two methods. Below you will see three different ways of pulling this off. The process is actually not difficult at all. However, the method you choose will probably be based on what you are most comfortable with.

Let’s take a look at all three methods now. You have the choice of using a plugin, using the WordPress media library, or using some code (if that is something you are comfortable with.

Method 1: Use a Plugin

This is the easiest method, though using the WordPress media library itself is pretty simple as well.

1. Install and Activate Plugin

In order to add title tags to images in WordPress this way, you first need to install and activate the Format Media Titles plugin. You can do this by jumping over to the Plugins page in the WordPress admin dashboard.

Install and activate format media titles

Simply search the plugin by name and install it right from there.

2. Access the Settings Page

Once the plugin has been installed and activated, click on Settings > Format Media Titles to access the main settings and configuration page for the plugin. You will see that this is now an available option after you activated the plugin.

Click settings then format media titles

3. Configure the Plugin to Your Liking

At this point, you should be on the main setting page for the plugin. There are a few settings to consider. Go ahead and fill those out according to what you want.

Configure settings

That’s it! Once you save changes, the plugin works to remove hyphens, underscores, and more from the filename. This creates clear, user-friendly titles.

Method 2: Using the WordPress Media Library

Another very simple way to add title tags to images is to simply use the WordPress media library itself.

1. Go to the Media Libray

Head over to the media library in the WordPress admin dashboard. Click on Media > Library to get there.

Click media then library

When the WordPress library comes up, click on any image that you want to add a title or edit the title on.

2. Edit Title Box

When you click on the image you want to edit, a popup box will appear. Here you can add an image title, add alt tags, and add a caption and description if needed.

Edit title box

That’s it. The title box will automatically update and save after you enter the title you want. Repeat this for all images you need to add or edit titles for.

Method 3: Add HTML Code to Images

Let’s start by showing you the HTML method.

1. Go to Pages Editor and Click on Text Mode

Go to the Pages section of WordPress and select any page with an image that you wish to add a title for. Switch the editor to the Text mode if you are not already in it. Text mode will show the page’s content in HTML format. The text editor is very popular and some developers actually disable the visual mode so they can work exclusively in the text editor.

2. Find Image Code in Content

Scroll through the content until you find the code for the image. In my case, the image is represented by:

<img class=”alignleft size-thumbnail wp-image-71″ src=”×150.gif” alt=”” width=”150″ height=”150″ />

3. Add Image Code

You need to simply add the following to your image’s code after the height amount:

alt=”Your Title” title=”Your Title”

Thus the final code for the image will look like this.

<img class=”alignleft size-thumbnail wp-image-71″ src=”×150.gif” alt=”” width=”150″ height=”150″ alt=”Cat” title=”Cat” />

4. View Image

Switch the editor back to the Visual mode and hover your mouse on the image. You should now see the title appear over the image if the code was edited correctly. You must repeat this for every image on your website that you want to add a title too. Don’t forget to save your changes on each page you do this on.

You should now see the title appear over the image

Now you could definitely edit the code of every image that you place on your website on new pages as well, but if you do not like the sound of that, you can just use the Restore Image Title plugin.


Make Sure There is a Reason to Add the Title

At the end of the day adding titles is nothing special and it may work well or fit in perfectly on other websites, but that doesn’t mean that it is perfect for every website. If you have a handful of random images, memes, or photos on your website, you might not find much value in this.

However, if your website is primarily based on images, then this might be worth adding to your website.

The key point applies to many things you can do on a website. You have a lot of freedom to take your time and add plenty of cool features. There’s no point in some of them depending on the nature of your website.

Always make sure that there is a reason and visitors will use the feature otherwise you just wasted valuable time that could have been spent on something else.


I hope this article was able to show you how easy it is to add title tags for images in WordPress. There are actually a couple of different methods you can use to accomplish the process. The choice you make is based on your level of comfort when using HTML code.

More often than not, the plugin method will be easier, but that is not always the choice for everyone. Both options accomplish the same thing. Try them both out and see what you like best.

Do you think it’s worth spending time updating every single image on your website to have a title? How do you think titles will benefit your visitor’s experience?

Author: Ron Helms

I currently work for GreenGeeks as a Support Technician. My primary roles are supporting our VPS and Dedicated server clients, as well as performing site migrations. With experience in the web hosting industry since 2009, there is rarely a question I can’t help answer. In my spare time, I enjoy gaming and working on cars as an automotive enthusiast.

Was this article helpful?

Related Articles


  1. This plugin already stopped working for 2 years and under violation guideline. Maybe you can update your article?

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.