Manage Your Media Library
-
- What this tutorial covers
- Before you start: prerequisites and when this won’t work
- How the AI Agent handles your media library
- Upload images and files through the agent
- Add and update metadata: alt text, captions, titles, and descriptions
- Run bulk metadata operations across hundreds of images
- Identify and remove unused media files
- Common mistakes and how to avoid them
- Frequently asked questions
- Can the AI Agent for WordPress add alt text to all my images at once?
- How does the AI Agent identify unused media files?
- Will the AI Agent overwrite my existing alt text or captions?
- Does the AI Agent for WordPress work for WooCommerce product images?
- How many AI Tokens does it cost to update 100 images?
- Can I undo a bulk metadata change made by the agent?
Use the AI Agent for WordPress in SiteGround AI Studio to upload media, generate alt text in bulk, and remove unused files through chat, and turn hours of clicks into minutes.
The AI Agent for WordPress connects to your WordPress site and lets you manage the entire media library through natural-language prompts. You can upload files, fill or rewrite alt text, captions, titles, and descriptions across hundreds of images at once. You can also identify media that have no post, page, or product references and delete or download what you no longer need. It works inside the SiteGround AI Studio interface and through a chat pop-up directly in WP Admin.
What this tutorial covers
- Upload single files or batches of images to your WordPress media library through chat instead of the Add New Media screen.
- Generate or rewrite alt text, captions, titles, and descriptions for any image, one at a time or across the entire library.
- Run bulk metadata operations on 200+ images in a single prompt, with a preview step before changes are applied.
- Identify unused media files (images with no parent post, page, or product attachment) and remove them safely.
- Use ready-to-copy example prompts for each task, structured for predictable results.
Before you start: prerequisites and when this won’t work
This tutorial assumes you have a WordPress site and access to SiteGround AI Studio. The AI Agent for WordPress is included for all SiteGround clients, but a few setup conditions need to be in place before any prompt will reach your media library.
What you need
- Access to SiteGround AI Studio.
- The AI Agent by SiteGround plugin installed and connected to your WordPress site. Once connected, the agent appears both inside AI Studio and as a chat pop-up in WP Admin.
- Administrator-level WordPress access for the user account the agent is connected to. The agent inherits that user’s permissions.
When this tutorial won’t help you
- Sites not connected through the AI Agent by SiteGround plugin. The agent works through the SiteGround plugin integration. A WordPress site without the plugin connected isn’t reachable from a SiteGround AI Studio account.
- Page builder media stored outside the WordPress media library. Some Divi, Elementor, and Beaver Builder modules embed images directly. The agent can’t edit metadata for assets that never enter the WordPress library.
- Sites with non-standard media storage. Offloaded libraries on Amazon S3, Cloudflare R2, or third-party DAM systems aren’t visible to the agent. It can only see what WordPress sees.
- Use cases requiring per-pixel image editing. The agent manages metadata and file organization, not image manipulation. For cropping, retouching, or AI image generation, use the Image Designer agent or another tool inside AI Studio.
How the AI Agent handles your media library
Before the prompts, here’s a quick mental model. When you send a media-related prompt, the agent translates your instruction into the same WordPress operations the admin UI performs — uploads, metadata updates, attachment queries, deletions — and chains dozens of them together in one go. Three behaviors shape how you’ll write prompts:
- The agent reads context. If you reference “the chair photo on the homepage” or “the images in last week’s blog post,” it will look up which attachments those phrases map to before acting. Vague references usually trigger a clarifying question rather than a wrong action.
- It previews bulk changes. For operations affecting many files (more than 5–10, depending on the action), the agent typically returns a sample of what it’s about to do and waits for confirmation. This is the single most important friction point to build into your prompts deliberately — see the bulk-operations section below.
- Destructive actions need Power Mode. Deleting files, removing categories, or any action you can’t easily undo is gated behind a Power Mode toggle in AI Studio. The agent will tell you when it needs it. See Permissions, Power Mode, and safety controls for how to enable it and what it covers.
Upload images and files through the agent
Uploading through chat is most useful in two situations: when you have a folder of files that need consistent metadata applied as they land, and when you want the file to be assigned to a specific post or product immediately on upload. If you’re building new content from scratch, the agent can generate and attach images as part of post creation — see Create new blog posts and pages for that workflow. Single-file ad-hoc uploads are usually faster through the standard WP Admin Add New Media screen.
What you can upload
Anything WordPress accepts: JPG, PNG, GIF, WebP, SVG (if your site allows it), PDFs, video files, and audio files. The agent inherits your site’s MIME type rules and file size limits. If a file is rejected, the reason will come from WordPress, not the agent — usually a server upload limit or a disallowed file type.
How to attach files to a chat
Drag the files into the AI Studio chat window or use the file directory in the left sidebar. From the WP Admin chat pop-up, the file picker works the same way. Files attached to a chat are available to any prompt in that conversation, so you don’t need to re-upload them for follow-up actions like adding metadata.
Example prompts for uploading
Upload the 12 product photos I just attached to my media library.
For each one, set the title to the file name (without the extension), add the caption “Studio Lumen — Spring 2026 Collection”, and tag them with the keyword “spring-collection-2026” in the description.
Skip any file that already exists in the library with the same name.
Upload the attached image as the featured image for the post titled “How to choose the right office chair”.
Generate alt text describing an ergonomic mesh office chair in dark gray on a white background, under 125 characters.
Upload all 47 images from the attached ZIP file. Place them in the media library with no metadata for now — I’ll fill in alt text in the next prompt once I see what came through.
The pattern in each prompt: state the action, attach the files, define every metadata field you want set on landing, and end with an exception clause (skip duplicates, leave metadata empty, etc.). Vague upload prompts work, but specific ones save you a follow-up cleanup pass.
Add and update metadata: alt text, captions, titles, and descriptions
Image metadata is where most media libraries silently rot. Alt text gets skipped during fast publishing, captions are inconsistent, and titles default to whatever the camera or stock site named the file. The agent fixes this in two modes: targeted updates for individual files and pattern-based updates across a defined subset.
The four metadata fields you can manage
| Field | What WordPress uses it for | Where the agent helps most |
| Alt text | Accessibility (screen readers), image SEO, fallback when an image fails to load. | Generating descriptive alt text from image content and surrounding post context. |
| Caption | Visible text shown below the image on the front end (in most themes). | Applying consistent attribution or context across batches of images. |
| Title | Internal label, sometimes shown as a tooltip; used by search inside the media library. | Renaming files from camera defaults (DSC_4521.jpg) to descriptive labels. |
| Description | Long-form text used by some themes on attachment pages; also indexed by some SEO plugins. | Adding rich descriptions for product or portfolio images when attachment pages are public. |
Example prompts for single-image updates
Update the alt text on image ID 4521 to describe an ergonomic mesh office chair in dark gray on a white background.
Keep it under 125 characters and include the phrase “ergonomic office chair”.
For the featured image of the post “How to set up your home office”, rewrite the title and description so they match the post’s main keyword “home office setup”. Leave the caption alone.
Example prompts for scoped updates
Find every image attached to posts in the “Recipes” category.
For each one, generate a caption that follows the format
“[Dish name] | Photo by [author of the post]”. Show me the first five before applying to all.
Update the description field on every image in the “Team” media folder to read “Internal headshot — do not redistribute”. Don’t touch any other field.
Notice the explicit “show me first” and “don’t touch any other field” patterns. Both are about narrowing the agent’s blast radius. Without them, you’ll occasionally see an update that overwrites a field you wanted to keep.
Run bulk metadata operations across hundreds of images
Bulk metadata is the highest-impact use of the agent for most sites. A WordPress media library with 200+ product images carries roughly 800+ individual metadata fields, and the agent can fill them in an afternoon.
The four-part bulk prompt structure
Every reliable bulk metadata prompt has four parts in this order:
- Scope. Define exactly which images to act on. By category, by date range, by attachment status, by alt-text status — anything but “all images.”
- Action. State the exact field to update and the rule for generating the new value.
- Constraint. Length limits, required keywords, format patterns, fields to leave untouched.
- Preview. Ask for a sample (5–10 results) before the full run. This is the single biggest safeguard against a bulk operation you’ll regret.
Example prompts for bulk operations
Find every image in the media library that’s missing alt text.
For each one, generate descriptive alt text under 125 characters based on the image content and the title of the post it’s attached.
If the image isn’t attached to any post, use only the image content. Show me the first 10 results before applying to the rest.
For all images uploaded between 2026-01-01 and 2026-03-31, add the caption “Photo by Studio Lumen | 2026” only if the caption field is currently empty. Don’t overwrite any existing caption. Show me a count of how many images will be affected before making changes.
For every product image attached to a WooCommerce product in the “Outdoor Furniture” category, rewrite the title to follow the format “[Product name] — [Color] — [Material]” using the product’s existing attributes. Keep alt text and captions unchanged. Preview the first five renames before continuing.
Why the preview step matters
Bulk updates that go wrong are painful to undo because WordPress doesn’t natively version attachment metadata. If you ask the agent to rewrite alt text on 400 images and the prompt was slightly off, you’ve now lost 400 alt-text values with no rollback. The preview step costs you 30 seconds and prevents that scenario entirely.
Identify and remove unused media files
Most WordPress sites accumulate orphaned media — files uploaded for a draft that was never published, swapped-out hero images, deleted blog posts whose images stayed behind, and duplicate uploads of the same asset. On a five-year-old site, this can easily be 30–50% of the library by file count.
The agent identifies unused files by checking whether each attachment ID appears in any post content, post meta (for featured images), product galleries, custom field references, or theme customizer settings. Files that fail every check are flagged as candidates for removal.
Example prompts for media cleanup
List all media files that aren’t attached to any post, page, or WooCommerce product. Sort by file size, largest first. Show me the top 30 with their file size, upload date, and file type.
Find every image in the media library larger than 1 MB that hasn’t been used anywhere in the past 12 months. Don’t delete anything yet — just give me a list with thumbnails so I can review.
Delete the 14 unused images I confirmed in the previous list.
Move them to trash first rather than deleting permanently, so I have 30 days to restore if I made a mistake.
Two safeguards before you delete anything
- Always run a “list, don’t delete” pass first. The agent’s definition of “unused” is technically accurate — no reference in the database — but it can miss images embedded as background images via custom CSS, hardcoded URLs in custom HTML blocks, or images referenced only inside cached page builder data. Eyeball the list before bulk deletion.
- Move to trash, don’t hard delete. WordPress keeps trashed media for 30 days by default, which gives you a recovery window if a deletion turns out to be wrong.
Common mistakes and how to avoid them
Mistake 1: Skipping the preview step on bulk updates
The fastest way to lose a hundred good alt-text values is to skip the “show me first” clause and trust a vague prompt. Always preview, read at least the first 5–10 results, and confirm scope before approving a full run.
Mistake 2: Treating “unused” as a guarantee
The agent flags files as unused based on database references. Files embedded through custom CSS, raw HTML, or cached page builder data can slip past that check. Review the list manually before any bulk delete, especially on sites with custom themes.
Mistake 3: Forgetting Power Mode for destructive actions
Bulk deletions, plugin removals, and core setting changes require Power Mode. If a prompt fails with a permissions message, that’s usually the cause. Toggle Power Mode in AI Studio, then re-run.
Mistake 4: Burning tokens on prompts that could be one prompt
Every back-and-forth costs tokens. A clear prompt with scope, action, constraints, and preview built in costs less total than five clarifying exchanges.
Mistake 5: Asking for image edits the agent can’t make
The agent edits metadata and file relationships, not pixels. For cropping, resizing, or generating new images, use the Image Designer agent inside AI Studio or a dedicated editor.
Frequently asked questions
Can the AI Agent for WordPress add alt text to all my images at once?
Yes. Use a single prompt that scopes the operation to images missing alt text, defines the format and length you want, and asks for a preview before applying changes across the full set. The agent can process hundreds of images in one run, with token cost scaling roughly linearly with image count.
How does the AI Agent identify unused media files?
The agent queries WordPress for every attachment ID and checks whether it appears in post content, post meta (including featured images), product galleries, custom fields, and theme customizer settings. Files with zero references across all those locations are flagged as unused. Files referenced only through custom CSS or hardcoded HTML are not always detected, so a manual review pass is recommended before deletion.
Will the AI Agent overwrite my existing alt text or captions?
Only if you tell it to. Bulk metadata prompts default to acting on the scope you define — if you specify “images missing alt text,” images that already have alt text are skipped. Always include explicit instructions like “only if the field is empty” or “leave existing values unchanged” when in doubt.
Does the AI Agent for WordPress work for WooCommerce product images?
Yes. The agent supports full WooCommerce integration for products, orders, inventory, pricing, and sales reports. Product image metadata, gallery management, and bulk updates across product categories all work the same way as for regular post images.
How many AI Tokens does it cost to update 100 images?
AI Tokens consumption depends on the type of update. A bulk caption-only update on 100 images is significantly cheaper than generating descriptive alt text for 100 images, because alt-text generation requires the agent to analyze image content. The 20,000 AI Tokens every SiteGround client gets each month cover smaller libraries, and if you need more, you can always add more tokens.
Can I undo a bulk metadata change made by the agent?
WordPress doesn’t natively version attachment metadata, so there’s no built-in undo for bulk updates. If you have a recent backup through SiteGround or any backup plugin, you can restore the database to recover the previous metadata values. The preview step before any bulk operation is the practical safeguard, since it prevents the bad change from happening in the first place.