One of AltTexty’s powerful features is its ability to use the context of the post or page an image is associated with to help the AI generate more relevant and meaningful alt text.
Here’s how to understand how AltTexty achieves this.
You can adjust how this works in AltTexty -> Settings -> SEO & Post Context Integration.
What Does AltTexty Consider “Context”?
Think of “context” as the main topic or clues about what a blog post or page is about. AltTexty primarily looks at:
- The Post Title: The title of your blog post or page where an image is used.
- SEO Keyphrases: If you use an SEO plugin (like Yoast SEO, Rank Math, etc.), these are the main keyphrases you’ve set for that post or page.
When AltTexty sends an image to the AI, it can also send these clues. This helps the AI understand the topic and create alt text that fits well with your content.
How AltTexty Learns and Remembers Clues for Each Image
AltTexty keeps notes about the main context for each of your images. These notes include:
- Which post is the source of clues for that image.
- The title of that post.
- Any SEO keyphrases it found for that post.
- Whether the image is the main “featured image” for that post.
How AltTexty Gathers and Updates These Clues
AltTexty has a few ways of figuring out and updating these contextual clues:
- The Initial Scan (Post-Activation):
- What it’s for: When you first activate AltTexty, it can do an “Initial Scan.” This is to get a starting set of clues for all the images already in your Media Library.
- How it works: You usually start this scan from an admin notice. It looks at images that don’t have any context clues stored yet. For each one, it checks which WordPress post it was originally uploaded to. If it finds a valid post, AltTexty saves that post’s title and SEO keyphrases as clues for the image. It also notes if it’s the featured image for that post.
- Does it read your post content? No. This scan relies on the official WordPress link between an image and the post it was uploaded to.
- The Context Rescan Tool (Manual Trigger from Settings):
- What it’s for: This tool lets you tell AltTexty to re-check and refresh the context clues for all images in your library.
- How it works: You can find this in AltTexty -> Settings -> Maintenance Tools. When you run it, AltTexty goes through all your images in the background. For each image, it looks at the post it’s currently officially linked to in WordPress. It gets the latest title and SEO keyphrases from that post and updates the image’s clues if they’ve changed.
- Does it read your post content? No. It also uses the official WordPress link.
- When to use it: Good if you’ve updated many post titles or SEO keyphrases, or changed where many images are attached.
- On New Image Upload (When Editing a Post):
- What it’s for: To get clues right away when you upload an image while you’re writing or editing a post.
- How it works: When you use the “Add Media” button in the post editor and upload a new image, WordPress usually links that image to the post you’re editing. AltTexty notices this and immediately saves the title and SEO keyphrases from the post you’re currently editing as clues for the new image.
- Does it read your post content? No. It relies on the link WordPress makes during the upload.
- On Post Save/Update (This is the Smartest One):
- What it’s for: When you save a post, AltTexty works to make sure images used in that post get clues from that specific post.
- How it works (in two parts):
- Happens Right When You Save:
- Featured Image: AltTexty takes the title and keyphrases from the post you’re saving and updates the clues for its main featured image. If the featured image wasn’t officially linked to any post before, AltTexty now links it to this post.
- Images Already Officially Linked: If other images are already officially linked to the post you’re saving, their clues get refreshed from this post too.
- Smart Background Check (if “Sync Context for Embedded Images on Save” is on in settings):
- After you save your post, AltTexty can start a background task. This task carefully reads through the content of only the post you just saved to find all the images you’ve actually placed (embedded) in it.
- For each image it finds in the content:
- If the image isn’t officially linked to any post yet (it’s “unattached”): The background task will officially link it to the post you just saved and then store the title and keyphrases from this post as its clues.
- If the image is already officially linked to the post you’re saving: Its clues are just refreshed to be sure they’re up-to-date.
- If an image is officially linked to a different post, but you’ve also used it here in the post you’re saving: AltTexty won’t change its main official relationship. But, for its own notes (the “AltTexty context fields”), it will update them to show that, for this particular use, the clues from the current post are important. This helps AltTexty generate relevant alt text when it’s thinking about the image in the context of the post you just saved.
- Happens Right When You Save:
- Does it read your post content? Yes, but only in the “Smart Background Check” part, only for the single post you just saved, and only if you’ve enabled that setting.
How This Helps You:
- Better Alt Text: When AltTexty knows the topic of the post an image is in, it can give better hints to the AI, resulting in more relevant alt text.
- It’s Flexible:
- Images uploaded directly to a post get clues from it immediately.
- Featured images always reflect the context of the post they belong to.
- Unattached images used in your content can get properly linked and have their context clues updated.
- If you use the same image in multiple posts, AltTexty tries to use the context of the post it’s currently working on (when that post is saved) to help generate alt text, without messing up the image’s main official WordPress link if it’s already set to another post.
- You’re in Charge: The “Context Rescan Tool” lets you update all the main official links and clues whenever you need to.
When you understand how AltTexty gathers these clues, you can make sure it has the best information to create high-quality and relevant alt text for your images.