Get AI SEO for FREE.

Learn More!

How to Automatically Set Alt and Title Attributes for Images

Adding alt and title attributes to your images is crucial in optimizing your website for differently-abled visitors and search engines.

With the right alt and title attributes, you can accurately describe your images, enhance the accessibility of your website, improve user experience, and boost your chances of ranking higher in search engine rankings.

Although Rank Math can automatically add these attributes to your images if you wish to manually add the alt attribute, navigate to the post or page where the image is located. In the WordPress block editor, locate the image you want to add alt text or upload a new one if necessary.

Click on the image and navigate to the Settings panel. If it’s not visible, click on its icon in the right corner to expand it, as indicated below.

Expanding the Settings panel in WordPress

In the block tab of the image settings, locate the Alternative Text field and enter a brief description of the image as the alt attribute, as shown below.

Tip: Use keywords naturally, but prioritize clarity for visitors who rely on screen readers.

Adding an alt text manually to an image

Similarly, you can set the title attribute from the Advanced section of the Settings panel, as shown below.

Adding a title attribute to an image from the Settings panel

Once you’ve added these attributes to all your images, don’t forget to click the Update button to save your changes.

Now that you know how to add alt and title attributes to your images manually, let us show you how to use Rank Math to add them automatically.

Adding Alt and Title Attributes Automatically Using Rank Math

Before we begin, head to the WordPress Dashboard → Rank Math SEO and enable the Image SEO module, as shown below.

Enable the image SEO module

1 Enable Add Missing ALT Attributes

The alt attribute is the text that displays when your browser cannot display an image. (You can replicate this by disabling images in your browser settings). If the image doesn’t contain an alt text, the field will either be blank or display a thumbnail, as shown below.

No Alt text

If the image contains an alt attribute, you’ll notice it displayed in place of the image, as shown below.

Alt text present

To automatically add alt text to your images, navigate to Rank Math SEO → General Settings → Images and enable Add missing ALT attributes. Then, navigate to the Alt attribute format field to set the naming format for the alt tag. 

Note: The Alt attribute format field is set to %filename% by default, but you can replace it with any variable of your choice. You can refer to this guide for the variables available in Rank Math.

Add Missing ALT Attributes

2 Enable Add Missing TITLE Attributes

The title attribute is the text that is displayed when you hover over an image. You can replicate this by heading to an image on your site and placing your mouse cursor over it. If the image has a title, it will be displayed, as shown below.

Screenshot of WordPress dashboard

To automatically add titles to your images, enable Add missing TITLE attributes. Once done, set the title naming format using the Title attribute format field. 

Add missing TITLE attributes

Once done, scroll to the bottom of the page and click Save Changes

Save changes

In conclusion, adding alt and title tags to your images is a simple yet crucial step in optimizing your website for search engines. By providing descriptive and keyword-rich alt text and titles, you improve the accessibility and visibility of your images, making them useful to both search engines and website visitors. 

That’s it. We hope you were able to automatically set titles and alt text for your images. If you have any questions, you’re welcome to contact our dedicated support team. We’re available 24/7, 365 days a year…

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles