Description
Sync post image alt text with Media Library values. Includes batch tools, filters, dry runs and WP-CLI support.
Features:
* Batch processing with a configurable batch size and delay.
* Filter posts by status and date range.
* Limit processing to a range of post IDs.
* Optionally skip posts without image tags.
* Exclude image file extensions.
* Dry-run mode to preview changes without saving them.
* Detailed browser logs and WP-CLI support.
* Translated administration interface: English, French, Spanish, German, Italian, Portuguese and Dutch. English is used when no translation is available.
The plugin updates image markup in post content. It does not modify the Alt Text stored in the Media Library.
Always run a dry run first and review the proposed changes before processing posts for real.
Usage
- Choose the post status and optional date range.
- Optionally set a minimum and maximum post ID.
- Configure batch size and delay.
- Choose whether to skip posts without image tags and whether to exclude specific image extensions.
- Run a dry run and review the log.
- If the preview is correct, select No for Dry Run and start processing.
- Use Stop to stop after the current batch has completed.
WP-CLI
Run from the WordPress installation directory:
wp image-alt-sync run --status=publish --after=2025-01-01 --before=2025-08-13 --batch-size=100 --delay=1 --dry-run --low-id=1 --high-id=9999 --skip-noimg=1 --exclude-ext=".svg,.gif"
Available arguments:
* --status= publish, pending, draft, private or any (default: publish).
* --after= Start date in YYYY-MM-DD format.
* --before= End date in YYYY-MM-DD format.
* --batch-size= Number of posts per batch (default: 100).
* --delay= Delay between batches in seconds (default: 1).
* --dry-run Preview changes without saving them.
* --low-id= Minimum post ID.
* --high-id= Maximum post ID.
* --skip-noimg=1 Skip posts without image tags.
* --exclude-ext= Comma-separated image extensions to exclude.
Installation
- Upload the plugin ZIP through Plugins → Add New → Upload Plugin, or install it from the WordPress Plugin Directory.
- Activate Image Alt Sync.
- Open Tools → Image Alt Sync.
FAQ
Does the plugin change the Media Library Alt Text?
No. It reads the Media Library Alt Text and updates matching image tags in post content only.
What happens in Dry Run mode?
The plugin reports the changes it would make but does not save post content.
Which images are processed?
Only image tags containing a WordPress attachment class in the form wp-image-123 are processed.
What if an image has no Alt Text in the Media Library?
The plugin uses the stored Media Library value, including an empty value. It does not generate replacement text.
Which languages are included?
The administration interface is available in English, French, Spanish, German, Italian, Portuguese and Dutch. English is used for other WordPress languages.
Changelog
1.5.2
- Removed prohibited suppress_filters query arguments from the minimum and maximum post ID lookups.
1.5.1
- Replaced direct SQL lookups for the lowest and highest post IDs with cached WordPress queries.
- Updated bundled translation loading to avoid the discouraged load_plugin_textdomain() call.
- Updated the tested WordPress version to 7.1.
1.5.0
- Added French, Spanish, German and Italian administration translations; English remains the fallback.
- Improved JavaScript message internationalization.
- Secured the post ID lookup AJAX actions with nonce and capability checks.
- Improved request validation, date handling and WP-CLI argument handling.
- Added safeguards when processing attachment IDs and reporting post update errors.
- Removed the reference to a missing external admin stylesheet; styles are registered inline.
- Updated Plugin Directory metadata and documentation.
1.4.11
- Maintenance and code cleanup.