How to Automatically Add Media Titles in WordPress

Images are an important part of a content rich website. Using proper titles and alternate text for images can make them SEO friendly. However if you upload a lot of images, then there is a good chance that you may sometimes forget to add proper title and alt text for your WordPress media files. In this article, we will show you how to automatically add media titles in WordPress.

How WordPress Handles Media Titles

WordPress automatically uses the filename as title for all media files you upload using the media uploader. WordPress leaves the alt text field blank for you to fill in. Not to mention that media title in WordPress is only used internally, and it is not used as the title parameter in the image tag. See our beginner’s guide on image alt text vs image title in WordPress.

Default WordPress media title field filled with image file name

Automatically Formatting Media Titles in WordPress

First thing you need to do is install and activate the Format Media Titles plugin. Upon activation simply go to Settings » Format Media Titles page to configure the plugin.

Format media title settings

The plugin allows you to remove hypens and underscores from media file names. For example, if your media file name is fruit-basket.jpeg, then it would become fruit basket in your image title field. By default, the plugin will remove hyphens and underscore, but you can also use it to remove period, tide, and plus characters from file name.

Format Media Titles can also capitalize words in the title field. There are number of options available. You can capitalize all words or first word only. You can also use lower case or uppercase characters for all words.

Under the Misc. Options section, you can add your formatted media title to the alternate text, description, and caption fields. We will recommend you to check the alternate text field, this way even if you forget to add an alternate text for your image, this plugin will automatically use the formatted media title as the alt text.

Now whenever you upload a new image, Formatted Media Titles will automatically format the file name used in title to be readable and SEO friendly.

Title and Alt text fields automatically filled

Note that the plugin will still not use your formatted media title as the title parameter in the img tag. For that you need to follow the instructions in our tutorial on how to easily add title attribute to images in WordPress.

We hope this article helped you automatically add media titles in WordPress. You may also want to see our guide on speeding up your WordPress site by saving images optimized for web.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

To leave a comment please visit How to Automatically Add Media Titles in WordPress on WPBeginner.

http://www.wpbeginner.com/?p=28407