Fix Missing Alt Text in a Modula Gallery with AI
Alt text written for each photo in a Modula gallery that has none, saved only after you approve it.
Prerequisites
A site connected to WPVibe running a recent Modula Image Gallery (tested on 3.0.22, free) on WordPress 6.9 or newer, with an administrator account. The gallery is made in Modula's new editor.
My WordPress site uses Modula Image Gallery. Write alt text for the photos in my [gallery name] gallery that have none. 1. Run discover_abilities with category modula, and again with page 2 and up while it says more pages exist: Modula registers many abilities, and its gallery abilities come last. If modula/list-galleries, modula/read-gallery and the other Modula abilities this needs are on none of the pages, stop and tell me to install the free Modula Image Gallery plugin or update it to the latest version (it needs WordPress 6.9 or newer). 2. Run modula/list-galleries with search set to words from the gallery name, status any and per_page 100 (status any includes galleries in the trash). Show each match with its status and ask which one if there are several. If the one I mean is in the trash and this job changes it, tell me it can't be changed there, offer to restore it with modula/restore-gallery (its revision from modula/read-gallery, a new request_id and status draft or publish, my choice), and wait. If none match, run rest_api GET /wp/v2/modula-gallery with search set to the same words, status publish,draft,private,pending,future, context edit and _fields id,title,status. If it is there, it was made in Modula's classic editor, which Modula's abilities can't read or change: tell me to convert it with Convert to new editor in its row's menu on Modula's Galleries screen in WordPress admin (Modula keeps the classic settings so it can be switched back, and its shortcode stays the same), then to check the page that shows it, because visitors see the new editor's version from then on, and stop. If it is in neither, run modula/list-galleries with status any, per_page 100 and no search (and page 2 and up while total_pages is larger) and show me the list. 3. Run modula/read-gallery with the id and per_page 50 (and page 2 and up while total_pages is larger) and collect the photo IDs (items with itemKind image). Do not use the alt in its items: it is a copy from when the photo was added, and the gallery shows a photo's alt text from the media library once it has one there. Run rest_api GET /wp/v2/media with include set to the photo IDs, in groups of 100 IDs, per_page 100, context edit and _fields id,title,alt_text,source_url. List the photos whose alt_text 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. 4. 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 source_url, describe it; otherwise base it on the title 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. 5. Tell me alt text belongs to the photo in the media library, so it also changes in other galleries and wherever else my site reads it from the media library. For each approved photo, run rest_api GET /wp/v2/media/PHOTO_ID with context edit and skip it if alt_text is no longer empty; otherwise run rest_api_write POST /wp/v2/media/PHOTO_ID with alt_text only. Never change alt text that is already there, or any other field. Do not use Modula's own alt text abilities, such as modula/update-attachment-text: on the free plugin they answer that they do not have permission. 6. Run rest_api GET /wp/v2/media with the same groups of IDs 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 Modula 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 Modula, checks each photo’s alt text in your media library, which is where Modula takes it from, and writes a short description for each one that has none: from the photo itself when it can see it, or from its title and file name, marked as a guess. Only the ones you approve are saved.
Alt text belongs to the photo in your media library, so it also changes in other galleries and wherever else your site reads it from the media library. 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.