Use case · Bulk media rename
Rename 30 cryptic image filenames at once.
IMG_2347.jpg becomes blue-sneakers-on-wooden-floor.jpg. Every intermediate size and URL is kept in sync. The agent does it inside wp-admin in under a minute.
The problem you actually have
Your media library is full of IMG_2347.jpg, DSC_0091.jpg, screenshot-2024-03-12-at-09-47-14.png. Search engines parse these filenames as ranking signals — and yours say nothing about the image. WordPress doesn’t ship a built-in bulk renamer because rewriting _wp_attached_file, every intermediate size, the metadata array, the post.guid and every embedded URL is fiddly.
The naive workaround (re-upload everything with new names) breaks every embedded reference in your published posts. The careful workaround (a database-aware bulk-rename plugin) is its own piece of software you have to learn, maintain, and trust.
What if you could just say “rename my last 30 image uploads” and the assistant figured it out — derived names from the alt text and the post each image is attached to, showed you a table for review, then applied the renames atomically (file + sizes + URL + metadata)?
How the assistant solves it
You type the request in plain English inside wp-admin. The agent picks wp_rename_media (plus wp_search_posts, wp_set_image_alt_bulk as needed) and walks the steps below.
- You ask: “rename my last 30 image uploads to descriptive names.”
- The assistant fetches the most recent attachments and runs
wp_rename_mediain dry-run mode. - It derives a slug for each image from alt text → caption → image title → parent post title (in that order, with a confidence score).
- You see a table: old filename → suggested filename, with confidence levels. You strike out the bad ones, edit a few in chat.
- The assistant calls
wp_rename_mediain apply mode with your final list. It renames the original file, every intermediate size (-150x150,-medium,-scaled,-1024x768), updates_wp_attached_file, the metadata array, the post.guid, the post title and slug — atomically per image. - You get a confirmation: 27 renamed, 3 skipped (no metadata to derive a name from). Recommended: run
wp_set_image_alt_bulkon the 3 skipped first, then retry.
Before vs after
| Without the assistant | With the assistant | |
|---|---|---|
| How long | 15-30 minutes per batch (using a media renamer plugin), or hours of manual edit-each-attachment | About 60 seconds per batch of 30, including review |
| Risk of broken images | High — easy to forget a size, miss a guid update, break an embed | Atomic per image: file + sizes + metadata + guid + title all updated together |
| Naming consistency | You as the human, picking different conventions on different days | Derived from your existing alt text and post titles, so internally consistent |
| Audit trail | None | Every rename written to animam_action CPT with timestamp and user |
Where it stops
- Post content embeds are not rewritten. If an image is embedded in dozens of posts, after the rename the old URL still appears in those posts. Run a search-and-replace afterwards (Better Search Replace plugin or
wp search-replace) — the assistant will remind you. - For images with no alt text, caption, title or parent post, there’s nothing to derive a name from. They’re flagged in the response. The right next step is to run
wp_set_image_alt_bulkfirst to add alt text, then re-run rename. - Capability-scoped: the user running the chat needs
upload_filescapability, plusedit_poston each individual attachment. An author user can rename their own uploads but not someone else’s. - 30 images per call is the hard cap. For larger batches, say “do the next 30” — the assistant chains calls until done.
FAQ
Will it break image embeds in my published posts?
The image will still display because WordPress redirects the old URL via the new guid. But the literal old filename in the post HTML is not rewritten — that requires a search-and-replace plugin run afterwards. The assistant flags this in the response.
What happens to the intermediate sizes (thumbnail, medium, large, scaled)?
They’re renamed in lockstep. WordPress generates files like IMG_2347-150x150.jpg for each size — these are renamed to match the new base name (e.g. blue-sneakers-150x150.jpg), and the metadata array is updated so WordPress finds them.
How does the assistant pick a name?
In order: alt text (highest confidence), caption, attachment title, parent post title (lowest). If none exist, the image is skipped with a note suggesting you run wp_set_image_alt_bulk first. You can always edit suggestions in chat before applying.
Is this on the free plan?
No — bulk rename is part of the Admin plan (€29/mo) or Bundle (€39/mo). The free Visitor plan covers the public chat widget only. The Admin plan unlocks all 20 admin tools including wp_rename_media.
Stop accumulating IMG_xxxx.jpg.
Free plan, no card. Or read the full admin assistant page.