AI Media Renamer
π€ AI Media Renamer β Automatic SEO-Friendly Image Naming for WordPress
by Suryakanth Β· github.com/suryakanth2004/ai-media-renamer Β· website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/suryakanth2004/ai-media-renamer/archive/refs/heads/main.zipAI Media Renamer (WP)
AI Media Renamer is a powerful WordPress plugin that leverages Google's Gemini AI to automatically rename your media files based on their content. It helps improve SEO, accessibility, and library organization by replacing generic filenames (like IMG_1234.jpg) with descriptive, keyword-rich filenames.
π Features
- AI-Powered Image Analysis: Uses Google Gemini (default: Gemini 2.5 Flash) to "see" your images and generate accurate captions.
- SEO-Friendly Filenames: Automatically converts captions into clean, hyphenated slugs.
- Bulk Processing: Process dozens of images at once with a stable, batch-based workflow.
- Auto-Rename Mode: One-click analysis and renaming for your entire library.
- Smart Filtering: Easily find "Generic" filenames that need renaming.
- Undo Functionality: Revert any rename operation with a single click if you change your mind.
- Automatic Content Updates: Automatically replaces old URLs with new ones in your posts and pages.
π οΈ Installation
- Download the repository as a ZIP file.
- Go to your WordPress Admin dashboard.
- Navigate to Plugins > Add New > Upload Plugin.
- Choose the ZIP file and click Install Now.
- Activate the plugin.
βοΈ Configuration
- Go to Media > AI Renamer in your WordPress sidebar.
- Click on the Settings tab.
- Enter your Google Gemini API Key. You can get one for free at Google AI Studio.
- Click π Test Connection to verify your key.
- Save settings.
π How to Use
Individual Renaming
- In the Dashboard tab, click π Analyse on any image.
- Review the suggested name and caption.
- Click β Approve to rename the file.
Bulk Renaming
- Select multiple images using the checkboxes.
- Click π Bulk Analyse to generate suggestions for all selected images.
- Once analysed, click β Bulk Approve to rename them all at once.
- Or use π Auto-Rename to do both steps automatically.
Filtering Generic Files
- Use the "Select Generic" button to automatically highlight files with names like
IMG_...,DSC_..., etc.
ποΈ Project Structure
ai-media-renamer.php: Main plugin entry point and initialization.admin/:class-admin-page.php: Handles the admin menu, tabs, and AJAX endpoints.assets/: CSS and JS for the admin interface.views/: HTML templates for the dashboard and settings.
includes/:class-ai-connector.php: Handles API communication with Google Gemini.class-media-scanner.php: Logic for scanning the media library and detecting generic names.class-renamer.php: Core logic for physical file renaming and DB updates.
π License
This project is licensed under the GPL v2 or later.
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request or open an issue for bugs and feature requests.
Built with β€οΈ by Suryakanth using AI.