
內容簡介
總結:Smart Alt Text 可自動根據圖片文件名稱為圖像創建 alt 屬性 - 只有在它們缺失時。這將改善 SEO、可訪問性和您的網站整體圖像質量。
問題與答案:
1. 什麼是 Smart Alt Text 的主要功能?
- 自動根據圖片文件名稱為圖像創建 alt 屬性,但僅在它們缺失時。
2. Smart Alt Text 的功能有哪些?
- 自動從圖片文件名稱生成 alt 文本
- 選擇格式設置:大寫、句子大小寫或小寫
- 批量應用 alt 文本至整個媒體庫
- 無縫支持文章、頁面和像 Elementor 這樣的建構者。
3. Smart Alt Text 的授權是什麼?
- GPLv2 或以上版本。
**HTML 編碼如下:**
```html
<ul>
<li>什麼是 Smart Alt Text 的主要功能?<br>- 自動根據圖片文件名稱為圖像創建 alt 屬性,但僅在它們缺失時。</li>
<li>Smart Alt Text 的功能有哪些?<br>- 自動從圖片文件名稱生成 alt 文本<br>- 選擇格式設置:大寫、句子大小寫或小寫<br>- 批量應用 alt 文本至整個媒體庫<br>- 無縫支持文章、頁面和像 Elementor 這樣的建構者。</li>
<li>Smart Alt Text 的授權是什麼?<br>- GPLv2 或以上版本。</li>
</ul>
```
外掛標籤
開發者團隊
原文外掛簡介
Images without alt text hurt accessibility and image SEO. Smart Alt Text fills the gaps automatically, and it never touches alt text you wrote yourself unless you ask it to.
What it does
New uploads: when you upload an image without alt text, it generates one and saves it to the Media Library.
Existing images: one click updates your whole library. It runs in small batches with a progress bar, so it works on sites with thousands of images.
Front-end fallback: any image still missing alt text gets one when the page is displayed. This covers post content (block and classic editor), featured images, galleries, WooCommerce and page builders such as Elementor.
Media Library tools: an “Alt text” column in list view shows which images are missing it, and two bulk actions let you generate or regenerate alt text for selected images.
Smart, readable results
Choose the source: the image title (editable in the Media Library), the file name, or the title of the post the image was uploaded to.
Clean-up removes noise such as IMG_1234, DSC0042, PXL_20240101_…, -scaled, -300x200, dates, timestamps, WhatsApp/screenshot prefixes and random hashes. IMG_4821-scaled.jpg in a post called “Kerala Backwaters Trip” becomes Kerala Backwaters Trip rather than “Img 4821 Scaled”.
Letter case: Title Case, Sentence case, lowercase, or keep the original.
Optional prefix/suffix with {site} and {post} placeholders.
Optionally also clean up the image title, and fill an empty caption or description on upload.
A preview table shows the suggested alt text for your images before you run anything.
For developers
WP-CLI: wp smart-alt-text stats, wp smart-alt-text generate [--dry-run] [--overwrite]
Filter smart_alt_text_generated_alt( $alt, $attachment_id, $raw, $settings ) changes the result.
Filter smart_alt_text_title_case_small_words sets the words kept lowercase in Title Case.
