Skip to main content
Cookbook Content Soliloquy

Make an Image Slider from Your Media Library with Soliloquy and AI

A Soliloquy slider built from photos already in your media library, with alt text, placed on a new draft page.

Difficulty Beginner
Time ~10 min

Prerequisites

A site connected to WPVibe running Soliloquy 2.9.0 or newer (the free Slider by Soliloquy plugin) on WordPress 6.9 or newer, with an administrator account. Allow AI to edit sliders is turned on in your WordPress admin under Soliloquy, Settings, AI & MCP. The photos are already in your media library.

The prompt
My WordPress site uses Soliloquy. Make an image slider from my photos of [what the photos show, or words from their titles] and put it on a new draft page called [page title].

1. Run discover_abilities with category soliloquy. If the Soliloquy abilities are not there, stop and tell me to install the free Slider by Soliloquy plugin or update it to 2.9.0 or newer (it needs WordPress 6.9 or newer). Then run soliloquy/describe-slider-schema. If writes_enabled is false, stop and tell me to turn on Allow AI to edit sliders in my WordPress admin under Soliloquy, Settings, AI & MCP, then ask again. Never change that setting yourself.
2. Search my media library with rest_api GET /wp/v2/media with search set to my words, media_type image, per_page 50, context edit and _fields id,title,alt_text,caption,source_url. It matches every word in titles, captions and descriptions, so if nothing fits, try each word on its own. Show me the matches as a numbered list with title, alt text (or: no alt text), caption (if any) and link; if 50 come back, tell me there may be more and offer to narrow the words. A photo's media library caption shows as text over its slide, so tell me which picked photos have one. Wait for me to pick the photos and their order.
3. Soliloquy copies each photo's title, alt text and caption from the media library at the moment the photo is added, and the slider keeps that copy: a photo with no alt text gets its title as alt text, and fixing alt text in the media library later does not change the slider. So before adding, list the picked photos with no alt text (up to 20 in one run; if there are more, tell me, and offer to do the first 20 now and the rest in another run) and write alt text of about 125 characters or fewer for each, from the photo itself if you can see it at its link, otherwise from its title, caption and file name, marked as a guess. Show me the list and wait for my yes or edits; tell me the alt text is saved in my media library, so it is used wherever the photo is used. Then read the approved photos again in one call, rest_api GET /wp/v2/media with include set to their ids, per_page 100, context edit and _fields id,alt_text, and skip any whose alt_text is no longer empty; save each of the rest with rest_api_write POST /wp/v2/media/ATTACHMENT_ID with alt_text only. Never change alt text that is already there.
4. Check for a page with that title: rest_api GET /wp/v2/pages with search set to it, status publish,draft,private,pending,future and _fields id,title,status,link; if one exists, show it and ask whether to make a new one anyway. Run soliloquy/list-sliders with search set to the page title and status any. If a slider with that title exists, show it with its slide_count and ask whether to make a new one anyway. Then run soliloquy/create-slider with title set to the page title and status publish. Tell me why it is published: a slider has no page of its own and shows only where a page places it, and a draft slider shows nothing to visitors even on a published page. Tell me its slider ID.
5. Run soliloquy/add-slides with the slider_id and attachment_ids in my order, up to 100 at a time. If any come back in skipped, tell me which: they are not images in the media library, or were uploaded by someone whose uploads this account can't edit. If nothing was added (an error such as soliloquy_no_images, or added is empty), stop and tell me, and that the empty slider is still in Soliloquy.
6. 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 Shortcode block (the block comment wp:shortcode) holding the soliloquy shortcode with id="SLIDER_ID" inside square brackets. Do not publish the page.
7. Check: Run soliloquy/get-slider with its id and max_length 100000. Its slides are the photos in the order they show, each with attachment_id, status, title, alt and caption. If the answer says it was cut, read the slides with rest_api GET /wp/v2/soliloquy/SLIDER_ID with context edit, _fields id,slider_data.slider and max_length 4000000 instead. That answer holds the same slides keyed by attachment id, but they arrive sorted by id, not in the order they show: use it for the count, titles, alt text and status only, and tell me the order could not be read. If that is cut too, tell me the slide list is incomplete. Confirm its status is publish, the attachment_id of each slide is in my order and each alt matches the photo's media library alt text (as written in step 3, or as it already was). Run rest_api GET /wp/v2/pages/PAGE_ID with context edit and _fields id,status,content.raw, and confirm the content holds the shortcode with the right id. Tell me that by default Soliloquy crops every slide to the slider's size, 960 by 300 pixels, so a photo of another shape is cut to fit; the size is set under Slider Dimensions, and cropping under Crop Images in Slider?, on the slider's Configuration tab in WordPress admin. Give me the link to edit the page and tell me the slider appears when I publish the page.
Already connected?

Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:

Run the “Make an Image Slider from Your Media Library with Soliloquy and AI” recipe from the WPVibe cookbook on my connected site.

The photos for the homepage banner, the new menu or the finished project are already in your media library. Turning them into a slider still means making it, picking each photo in order, fixing alt text and placing it on a page, so the old banner stays up.

Tell the AI what the photos show. It searches your media library, shows you the matches, and writes alt text for the ones you pick that have none, saved only after your yes. Then it builds a Soliloquy slider from them in your order and puts it on a new draft page, which stays a draft until you publish it.

Alt text comes first because Soliloquy copies it into the slider when a photo is added and keeps that copy. The AI publishes the slider itself, because a slider has no page of its own and a draft slider shows nothing to visitors even on a published page. By default every slide is cropped to the slider’s size, 960 by 300 pixels, which you can change in the slider’s settings. The recipe makes a block editor page; on a page builder, place the slider with the builder’s own element. To add photos to a slider you already have, use this recipe.

Outcome

A published Soliloquy slider of the photos you picked, in your order and with alt text, on a new draft page that shows it once you publish the page.