Add metadata to WordPress images
Search engines can’t see the visual content displayed in an image, even if it includes words. In fact, all search engines can actually recognize and index are strings of characters in HTML code. It’s our job to help them out by providing text labels and descriptions for the images we use—we call this text metadata. The metadata is attached to the image, and even though much of it is not apparent to someone viewing the image, search engines “see” the metadata and index it. Like all text, your image metadata should contain relevant keywords to maximize its search value. And although title elements and captions aren’t technically metadata since they are visible, WordPress groups them together in the Image Editor, so we are covering them in this tutorial.
Where you edit metadata
There are several ways to access the image editor in WordPress: which one you use depends on the location of the image. If you’ve already inserted the image into a post or page, you can click on the image, then click on the small, framed icon that appears at the top left corner of the image. That opens The Edit Image panel, where you can add or edit the picture’s title, alternative text and caption information. If you’re just uploading a new image, you’ll have a chance to add the metadata including the description element then save the image to the Media library. For images that have been added to the Media Library, you can simply choose to edit that image from the Library list.
Write a short title element
For every image you use in your post or page, you should include a Title, Alternative text and a description. The title should be short—just a few words or a simple phrase such as “The WordPress image editor.” Since the title element becomes visible when a user hovers their cursor over the image, you should use a consistent, descriptive style.
Attach Alternative (ALT) text
The Alternative text, or Alt text, is used by browsers that don’t show images, such as readers that are used by visually impaired site visitors, so it’s important to provide those users with a description of the image. Providing solid ALT text is an important part of website accessibility, and you should take the time to add this element in a thoughtful manner. Your reward will be the added search engine optimization that proper ALT text provides.
Include a description
The Description text is also indexed by search engines and can provide additional detail about the image. Try to keep your descriptions fairly short and accurate, but avoid being so vague that the text is meaningless. You should describe the context of the image, and this is a good place to acknowledge the image source. Use complete sentences in your description, and don’t forget to include relevant keywords.
Add a caption to the image
Caption text appears beneath the image, so it should be crafted with the reader in mind. If your post or page article is written in a particular style, the caption should reflect that. In many of our AIMBIZ tutorials, you’ll find that we include captions to help walk viewers through the most important steps of the tutorial. Those captions also appear in the Gallery page, which you’ll access if you click on the image.
That’s it folks. Now let’s add some metadata to those great images on your site.