
Auto Alt Text From File Name – Made by Saad
v1.1.0Mohamed Saad · 2025年7月3日 上架
Fills empty alt text from the image's file name, and captions other media on request. Skips meaningless names such as IMG_1234.
- 正在使用
- 40+
- 评分
- 暂无
- 累计下载
- 1,068
- 最近更新
- 2026年11月11日
需要 WordPress 5.2+已测试到 7.1.5PHP 7.4+
贡献者
截图
Auto Alt Text From File Name fills the alt text of new images from their file name, and can caption audio, video and documents the same way. It is a starting point for sites whose files already have descriptive names. It is not a substitute for alt text written by a person.
red-running-shoes.jpg becomes "Red running shoes". `IMG_1234.jpg` gets nothing, because the name says nothing about the picture.
What it does
- Fills alt text for new images when the field is empty. Existing alt text and captions are never overwritten.
- Optionally writes a caption for audio, video and documents.
- Mass Update fills empty fields in the existing Media Library and reports how many items it changed and skipped.
- Uses the original file name: no “-scaled”, “-rotated” or edit numbers, no “-1” for a second copy, accents kept.
- Skips camera, screenshot, messenger and number-only names.
- Leaves site icons, logo and header crops alone, and keeps WordPress’s own alt text for the site logo.
- Alt text added later by an importer replaces the generated text.
- Templates per file type and per format, for example
{filename}orProduct photo: {filename}. An empty template writes nothing. - No account, no API key and no outside requests.
For developers
aatf_generated_textfilters the final text. Return an empty string to skip the file. Arguments: text, attachment ID (0 while a caption is prepared before the attachment exists), source name.aatf_junk_patternsfilters the list of regular expressions that mark a name as meaningless.


