| 开发者 | devlab33 |
|---|---|
| 更新时间 | 2026年11月11日 22:25 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
alt attribute and fills it in from the source you choose: the attachment title (default), the caption, the description, or the file name cleaned up (extension, size and duplicate-upload suffixes removed, hyphens and underscores turned into spaces, first letter capitalised when the name has no capital letters).IMG_4032, IMG-20261024-WA0012, Screenshot 2026-10-24 at 3.20.11 PM, Captura de Tela 2026-10-24 às 15.20.11), hash file names or names with no real word, and leaves those images without alt text instead of adding noise.role="presentation" or aria-hidden="true") and leaves their empty alt as it is..htaccess, does not store any cache, does not crawl your site and loads no file on your public pages. Only the <img> tags that need an alt are edited; the rest of your HTML is left exactly as it was.
For developers
Use the devlab_alt_text filter to change the text before it is used, or return an empty string to leave an image without alt text:
add_filter( 'devlab_alt_text', function ( $text, $attachment_id, $source ) { return $text; }, 10, 3 );
Privacy
This plugin collects no data, sends no data to anyone, contacts no external service and needs no account or API key. It does not set cookies. It does not provide legal advice and does not guarantee that your site meets any accessibility standard or law; it fills in one missing attribute.
About DevLab
DevLab builds plugins and themes for WordPress. The plugin adds a DevLab menu with its settings screen. That screen has a small box with a link to the DevLab Store (devlab.ia.br/store) and one dismissible notice. Nothing promotional is added anywhere else in your dashboard or to your public pages (the only change there is the missing alt attribute), and the plugin never adds a credit link to your site.
devlab-image-alt folder to the /wp-content/plugins/ directory, or install the plugin from the Plugins screen in WordPress.In the WordPress dashboard, under DevLab > Image Alt. There is also a Settings link on the Plugins screen.
No. The alt text is added only in the HTML that visitors receive. Nothing is written to your media library or your posts; the plugin only stores its own settings option and a per-user flag for its dismissed notice.
No. Only empty or missing alt attributes are filled in.
An empty alt is the right choice for purely decorative images. The plugin leaves alone images marked with role="presentation", role="none" or aria-hidden="true". For any other image with an empty alt it cannot tell whether the emptiness was intentional, so it fills it. If you need an exception, use the devlab_alt_text filter to return an empty string for that attachment.
When the source you chose (for example the caption) is empty for an image, the plugin uses the cleaned-up file name instead. Titles are filled by WordPress from the file name when you upload, so the default source gives similar results. If the file name says nothing (IMG_4032), no alt text is added. For the best results, write real alt text in the media library.
If you use a page cache or a performance plugin, clear its cache after you save the settings. Also check that the image is a file from your media library: images from other websites are not changed.
It works on the HTML that WordPress prints for post content and on images printed with the standard WordPress image functions. A builder that prints its own <img> tags outside of the post content, or that builds images without WordPress functions, is outside of what the plugin can see.
No. It fills in one missing attribute. Please check the accessibility rules that apply to you for everything else your site does.
The plugin's option and the "notice dismissed" flag are removed. Your media library, posts and other settings are not touched, because the plugin never changed them.