WordPress Plugin For Alt Text: Extract Alt on Upload

We recently spotted a new plugin for WordPress that will take the contents of the Alt Text IPTC field of an image file and copy it to the “alt” HTML attribute of the IMG tag when that image is uploaded and used in WordPress.

Extract Alt on Upload by Adam Silverstein

We just installed it for this very blog, using the instructions “How to install a WordPress plugin from a Gist.” We went with the “Installing via ZIP” method. So, let’s see if it works with this image:

A 50-foot tall statue of a green Tyrannosaurus Rex dinosaur painted to look like it is wearing a red Santa Claus outfit with black boots. It looms against a deep blue sky with palm trees and a wooden fence.
The infamous T-Rex in his Santa finery (you may know it from “Pee Wee’s Big Adventure”) at the @cabazondinosaurs exit outside Palm Springs.

Here’s the IPTC Info as seen in Photo Mechanic:

screenshot of Photo Mechanic IPTC Info

There are various browser plugins that can help you view the Alt Text field. This is how it shows up when viewing with the Image Alt Text Viewer plugin in Chrome:

Success! We’ve gotten many requests for how to do this over the years, so we’re happy that Adam wrote this plugin. Note: Camera Bits has no connection to Adam Silverstein. We are simply fans of this WordPress plugin. The standard advice of use-at-your-own-risk applies here as well, but a look at the source code suggests it is not a huge security risk.

Alt Text, as a reminder, is different than the “Caption” field, and should contain information about the visual content of the image, rather than the full context and description that would be in a caption. Read more about how Alt Text in Photo Mechanic in a prior blog post: Alt Text: New Accessibility Metadata Fields in Photo Mechanic

Finally, a hat tip to Margaret from the Controlled Vocabulary Discussion Forum for passing along the link to this plugin.