Image Alt Text Populator
Automatically populates image alt text for SEO. Covers all product images (featured + gallery), uses the image/product title plus your website name, and includes bulk update for existing images.
by Kelvin Chebon · github.com/chebon254/image-alt-text-wordpress-plugin · 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/chebon254/image-alt-text-wordpress-plugin/archive/refs/heads/main.zipA professional WordPress plugin that automatically populates image alt text for SEO — including all WooCommerce product images (featured + gallery) — using the image/product title plus your website name. Built with modern PHP 8.0+ and WordPress 6.0+ best practices.
Features
- ✅ Title + Site Name format (SEO) - Alt text like
Product Name - My Website, built from the product/page/image title and your site name - ✅ Full product image coverage - Featured images and gallery images of every WooCommerce product, even images not "attached" to the product
- ✅ Auto-populate new uploads - Automatically adds alt text to newly uploaded images
- ✅ Auto-populate on product save - Product images get SEO alt text whenever a product is saved
- ✅ Bulk update existing images - Process all existing images in your media library
- ✅ Multiple alt text formats - Title + Site Name, Site Name, Site Name + Filename, or Custom Text with
{title},{site}and{filename}placeholders - ✅ Smart overwrite options - Choose whether to overwrite existing alt text or only update empty ones
- ✅ Real-time statistics - See how many images have alt text at a glance, plus a product-image count
- ✅ Progress tracking - Visual progress bar during bulk updates
- ✅ Batch processing - Efficiently handles thousands of images
- ✅ Modern UI - Clean, intuitive admin interface
Requirements
- WordPress 6.0 or higher
- PHP 8.0 or higher
Installation
Manual Installation
- Download the
image-alt-text-populatorfolder - Upload it to your
/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Tools → Alt Text Populator to configure settings
ZIP Installation
- Compress the
image-alt-text-populatorfolder into a ZIP file - In WordPress admin, go to Plugins → Add New → Upload Plugin
- Choose the ZIP file and click Install Now
- Activate the plugin
Usage
Quick Start
- After activation, go to Tools → Alt Text Populator
- Review your current image statistics
- Configure your preferred settings
- Click Update All Images to process existing images
Settings
Auto-Populate New Uploads
Enable this to automatically add alt text to all newly uploaded images.
Overwrite Existing Alt Text
- Disabled (recommended): Only updates images without alt text
- Enabled: Replaces all alt text, even if already set
Alt Text Formats
-
Title + Site Name (recommended for SEO)
- Example:
"Blue Running Shoes - My Awesome Website" - The title is resolved in this order: the WooCommerce product using the image (featured or gallery) → the post/page the image is attached to → the image's own title → a cleaned-up filename
- Best for: SEO — descriptive, keyword-rich alt text for every product image
- Example:
-
Site Name Only
- Example:
"My Awesome Website" - Best for: Simple, consistent alt text
- Example:
-
Site Name + File Name
- Example:
"My Awesome Website - Product Photo" - Best for: More descriptive alt text that includes file context
- Example:
-
Custom Text
- Example:
"{title} | {site}"→"Blue Running Shoes | My Awesome Website" - Supports
{title},{site}and{filename}placeholders - Best for: Specific branding requirements
- Example:
Bulk Update
The bulk update feature processes all images in batches of 50 to prevent server timeouts:
- Click the Update All Images button
- Confirm the action
- Watch the progress bar as images are processed
- View the results summary when complete
Features in Detail
Automatic Alt Text for New Uploads
When enabled, every new image uploaded to your media library will automatically get alt text based on your chosen format. No manual work required!
Smart Batch Processing
The plugin processes images in batches of 50, making it safe to use even with thousands of images. The AJAX-based system prevents timeouts and provides real-time feedback.
Statistics Dashboard
See at a glance:
- Total number of images in your media library
- How many images have alt text
- How many images need alt text
Multiple Format Options
Choose the alt text format that works best for your SEO strategy:
- Simple site name for brand consistency
- Site name + filename for better context
- Custom text for specific requirements
Technical Details
Modern WordPress Standards
- Object-oriented PHP with type declarations
- WordPress Coding Standards compliant
- Secure AJAX with nonce verification
- Proper capability checks
- Sanitization and escaping
Performance
- Batch processing prevents timeouts
- Efficient database queries
- Minimal server load
- Works with any number of images
Security
- Nonce verification for all AJAX requests
- Capability checks (
manage_options) - Input sanitization
- Output escaping
- No SQL injection vulnerabilities
File Structure
image-alt-text-populator/
├── image-alt-text-populator.php # Main plugin file
├── includes/
│ └── admin-page.php # Admin interface template
├── assets/
│ ├── css/
│ │ └── admin.css # Admin styles
│ └── js/
│ └── admin.js # Admin JavaScript
└── README.md # This file
Frequently Asked Questions
Will this work with existing images?
Yes! Use the "Bulk Update" feature to process all existing images in your media library.
Can I choose which images to update?
The plugin processes all images, but you can choose whether to overwrite existing alt text or only update empty ones.
What if I have thousands of images?
No problem! The plugin uses batch processing to handle any number of images without timing out.
Can I customize the alt text?
Yes! Choose from three format options or use custom text.
Will this slow down my website?
No. The plugin only runs when processing images or uploading new ones. It has no impact on front-end performance.
Support
For issues, questions, or feature requests, please create an issue on the GitHub repository.
Changelog
Version 2.0.0
- New default "Title + Site Name" alt text format for SEO
- Full WooCommerce product image coverage: featured images and gallery images, including images not attached to the product
- Product images are (re)populated automatically when a product is saved
- Custom text format now supports
{title},{site}and{filename}placeholders - Statistics now use direct SQL counts (fast on large media libraries) and show a product-image count
- Live preview updated for the new format and placeholders
Version 1.0.0
- Initial release
- Auto-populate new uploads
- Bulk update existing images
- Multiple alt text formats
- Statistics dashboard
- Modern admin interface
License
This plugin is licensed under the GPL v2 or later.
Credits
Developed with ❤️ for better SEO and accessibility.
Roadmap
Potential future features:
- [ ] Schedule automatic updates
- [ ] Category/tag-based alt text
- [ ] AI-powered image description
- [ ] Export/import settings
- [ ] Multi-language support
- [ ] Custom post type support
- [ ] Advanced formatting options
Note: This plugin modifies image alt text in your media library. Always backup your database before making bulk changes.