Make a Photo Gallery Page from Your Media Library with FooGallery and AI
A FooGallery gallery built from photos already in your media library, placed on a new draft page.
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. The photos are already in your media library.
My WordPress site uses FooGallery. Make a gallery from my photos of [what the photos show, or words from their titles] and put it on a new draft page called [page title]. [Optional: a layout such as masonry, justified or carousel, and settings such as 3 columns or a dark lightbox.]
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/media-search with search set to my words and limit 50. It matches my words as one phrase in titles, captions, descriptions, alt text, file addresses and media categories, so if nothing fits, try each word on its own. It searches every file in the media library and does not say which are images: keep only the ones whose url ends in an image file extension (jpg, jpeg, png, gif, webp, avif) and whose width is above 0. Show me the matches as a numbered list with title, alt text (or: no alt text) and link, and wait for me to pick the photos and their order.
3. Run foogallery/list-layouts. If I named a layout, use its slug; if not, suggest one (masonry keeps each photo's shape, justified makes even rows, carousel shows one row that slides) and ask. If I asked for settings, run foogallery/get-gallery-layout-schema with that layout and use only setting ids it lists. For a setting with choices, send one of its choices: FooGallery saves any other value as the default without an error. A setting of type thumb_size or thumb_size_no_crop (thumbnail size) takes width and height as whole numbers instead of value, plus crop for thumb_size. Tell me anything you could not map.
4. Run foogallery/create-gallery with title set to the page title, the layout, attachment_ids in my order, the settings as a list of objects with id and value, and status publish. Tell me why it is published: a FooGallery gallery has no page of its own and only shows where a page places it, and a draft gallery shows nothing even on a published page. Tell me its gallery ID.
5. Create the page with rest_api_write POST /wp/v2/pages with the title, status draft, and content: a paragraph block with one short line about the photos if I gave you one, then a FooGallery block, written as the self-closing block comment wp:fooplugins/foogallery with the attributes {"id":GALLERY_ID}. Do not publish the page.
6. Check: run foogallery/get-gallery with the gallery_id and confirm the photo IDs are in my order, its status is publish, and each setting I asked for reads back as sent; report any that do not. Run rest_api GET /wp/v2/pages/PAGE_ID with context edit and confirm the content holds the block with the right id. Give me the link to edit the page, list the photos with no alt text and offer to write it: show me the proposed alt text and wait for my yes or edits, then for each photo run rest_api GET /wp/v2/media/ID with context edit, skip it if alt_text is no longer empty, and otherwise save it with rest_api_write POST /wp/v2/media/ID with alt_text only, and tell me the gallery appears when I publish the page.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Make a Photo Gallery Page from Your Media Library with FooGallery and AI” recipe from the WPVibe cookbook on my connected site.
The photos from the event, the finished project or the new menu are already in your media library. Turning them into a gallery page still means finding each one, building the gallery, choosing a layout, making a page and placing the gallery on it, so they sit unused.
Tell the AI what the photos show. It searches your media library through FooGallery, shows you the matches with their alt text, and builds the gallery from the ones you pick, in your order, with the layout and settings you asked for. It puts the gallery on a new draft page and checks the page holds it. Nothing is public until you publish the page.
The AI publishes the gallery itself, because a FooGallery gallery has no page of its own and a draft gallery shows nothing even on a published page. The recipe makes a block editor page; on a page built with a page builder, add the gallery there with the builder’s own element. To add photos to a gallery you already have, use this recipe.
Outcome
A published gallery of the photos you picked, in your order, on a new draft page that shows it once you publish the page.