logomichael sumner
Contact

How to quickly solve missing alt text in WordPress

*Please note that although this is a quick solution, it is not the right way.
*Alt text is meant to describe the image e.g. ‘dog with butterfly on its nose’, and not ‘dog-butterfly-nose’ or ‘How to quickly solve missing alt text in WordPress’.
*If there is a plugin you know that adds alt text through the Image Title attribute, please let me know!

Alt text is somewhat important especially if you have more than 20 on your website. They might need addressing before they all go haywire.

WordPress best practice says to take your images from the Media Library, and not saved somewhere into your theme itself.

But if you’ll be using images in the theme files, please use the alt attribute. It takes 3 seconds!

The main reason for using Media Library images, is that you get the advantage of resizing images and creating new image sizes through your theme! Speed your site, and therefore increase conversion rate and user retention rate!

Missing alt text from Media Library images

My preferred solution would be to use a plugin for this!

The plugin is called ’SEO Image Optimizer‘.

But the feature I best love about this plugin is that you can quickly solve your ‘alt text’ from images (which is a point on our SEO onsite healthcheck).

Here’s a video of me going through the feature, and how it solves missing alt text.

Missing alt text from hardcoded img from theme files

Bear in mind that the previous solution will only solve missing alt text from images found on the Media Library.

What if we’ve got images coming from the theme files?

Unfortunately, they’ll have to be searched for through the theme files, and add alt="logo" as an example:

// BEFORE: header.php file

And we will have to hardcode any missing alt text from images.

// After: header.php file

No workaround for locating these yet, but please share me your thoughts in the comments below.

Conclusion

Now that is a 5-minute job, to solve most of the missing alt text from images, by using the Media Library!