Image Alt Sync
Image Alt Sync scans selected posts and updates any <img> tags found in the post content that reference media items (class wp-image-### ), and replaces their alt attributes with the attachment’s _wp_attachment_image_alt value: – If the image is in the Media Library, it prefers the attachment’s Alt T
About this tool.
Image Alt Sync scans selected posts and updates any <img> tags found in the post content that reference media items (class wp-image-### ), and replaces their alt attributes with the attachment’s _wp_attachment_image_alt value: – If the image is in the Media Library, it prefers the attachment’s Alt Text. – If no attachment alt is set, it falls back to the image filename (without extension) or the post title (configurable in the UI). – Optionally skip images that aren’t found in the Media Library. – Optionally restrict by image file extensions (e.g. jpg,webp ).
Run in dry run first to see exactly what would change. The log shows each post processed and any per-image alt changes.
Highlights – Processes per post in batches with a customizable delay (default 100 posts, 1s). – Filter by post status and date range (quick buttons: Today, Yesterday, Last week, Last month, YTD, All). – Validate that “Date after” ≤ “Date before”. – Limit by Post ID range with buttons to auto-fill lowest and highest post IDs. – Skip posts without <img> (optional). – Exclude image extensions (comma-separated, e.g. .svg,.gif ). – Dry run (browser & WP-CLI) shows clickable post IDs, post titles, filenames , and detailed old → new alt replacements. – Only processes posts that have at least one image attachment .
For more details you can send mail with your suggestions, recommendation to dufour_l@hotmail.com
Usage
- 01Choose your filters (date range, min/max post ID, or “Apply to all posts”).
- 02Set Batch size and optional Delay between batches to throttle load.
- 03Choose a Date Range , or click a shortcut button (autofills Date after / Date before ).
- 04(Optional) Enter Lowest/Highest Post ID or click the quick-fill buttons.
- 05(Optional) Check Skip posts without <img> .
- 06(Optional) Enter Exclude extensions like .svg,.gif .
- 07Optionally enable Dry run to preview changes without saving.
- 08Click Start . Progress and detailed per-post changes appear in the log.
- 09If needed, click Stop to pause after the current batch finishes.
Tips – Use the “Lowest ID” and “Highest ID” buttons to auto-fill the ID range. – Use the extension filter (e.g. jpg, jpeg, png, webp ) to target specific image types. – Check “Skip images not in media library” to avoid external or missing files.