Fix Missing Alt Text in a FooGallery Gallery with AI
Alt text written for each photo in a FooGallery gallery that has none, saved only after you approve it.
Prerequisites
A site connected to WPVibe running a recent FooGallery (tested on 3.3.37, free) on WordPress 6.9 or newer, with an administrator account.
My WordPress site uses FooGallery. Write alt text for the photos in my [gallery name] gallery that have none. 1. Run discover_abilities with category foogallery-management. If the FooGallery abilities are not there, stop and tell me to install the free FooGallery plugin or update it to the latest version (it needs WordPress 6.9 or newer). If a FooGallery ability answers that it does not have the necessary permission, tell me to open any page of my WordPress admin once while signed in as an administrator (FooGallery sets up its gallery permissions there, and misses them when it was activated without an admin page loading, for example with WP-CLI), then try again. If it still answers that for one gallery, that gallery ID does not exist: check it with foogallery/list-galleries. 2. Run foogallery/list-galleries with search set to words from the gallery name and status any. If several match, show them with their photo counts and ask which one. If none match, run it again without search and show me the list. Then run foogallery/get-gallery with the gallery_id and include_attachment_detail true. If its datasource is not media_library, tell me its photos come from somewhere else and stop. List the photos whose alt is empty. If there are none, tell me and stop. If there are more than 20, do the first 20 and ask before the next. 3. For each, write alt text of about 125 characters or fewer that says what the photo shows. If you can see the photo at its link, describe it; otherwise base it on the title, caption and file name and mark it as a guess. No keyword stuffing, and do not start with words like image of. Show me a numbered list with title, link and the proposed alt text, and wait for my yes or my edits. 4. Tell me alt text belongs to the photo in the media library, so it also changes wherever my site reads it from there, such as other galleries and featured images; images already placed in posts keep their own copy. For each approved photo, run rest_api GET /wp/v2/media/ID with context edit and skip it if alt_text is no longer empty; otherwise run rest_api_write POST /wp/v2/media/ID with alt_text only. Never change alt text that is already there, or any other field. 5. Run foogallery/get-gallery with include_attachment_detail true again and report each photo with its new alt text, and any still without.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Fix Missing Alt Text in a FooGallery Gallery with AI” recipe from the WPVibe cookbook on my connected site.
Galleries are where alt text goes missing: photos are uploaded in batches and the alt field stays empty. Screen readers then say nothing useful, and search engines can’t tell what your photos show. Filling it in by hand, one photo at a time, rarely happens.
The AI reads the gallery through FooGallery, lists every photo with no alt text, and writes a short description for each from the photo itself when it can see it, or from its title, caption and file name, marked as a guess. You check the list, and only the ones you approve are saved, in your media library, where FooGallery reads them.
Alt text belongs to the photo in your media library, so it also changes wherever your site reads it from there, such as other galleries and featured images; images already placed in posts keep their own copy. The AI never overwrites alt text that is already there, and works 20 photos at a time on a large gallery. For every image on your site, not just one gallery, use this recipe.
Outcome
Every photo in the gallery that had no alt text has the alt text you approved, and the photos that already had it are unchanged.