前言介紹
- 這款 WordPress 外掛「Image Alt Sync」是 2025-10-09 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2025-10-10,距離現在已有 139 天。
- 外掛最低要求 WordPress 5.4 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
dufour_l |
外掛標籤
seo | batch | images | Alt Text | accessibility |
內容簡介
```html
<ul>
<li>Image Alt Sync 掃描選定的文章並更新文章內包含的所有<img>標籤,該標籤引用媒體項目(類別 wp-image-###),並將其alt屬性替換為附件的_wp_attachment_image_alt值:
<ul>
<li>如果圖像在媒體庫中,它會優先選擇附件的Alt文本。</li>
<li>如果未設置附件alt,則會回退到圖像文件名(無擴展名)或文章標題(在UI中可配置)。</li>
<li>可選擇跳過在媒體庫中找不到的圖像。</li>
<li>可選擇按圖像文件擴展名限制(例如,jpg、webp)。</li>
</ul>
</li>
<li>首先進行乾跑,查看將發生的具體更改。日誌顯示已處理每個文章以及每個圖像alt的更改。</li>
<li>突出特點
<ul>
<li>按批次處理每個文章,可自定義延遲時間(默認100篇文章,1秒)。</li>
<li>按文章狀態和日期範圍篩選(快速按鈕:今天、昨天、上週、上個月、YTD、全部)。</li>
<li>驗證“日期後”≤“日期前”。</li>
<li>通過按鈕限制文章ID範圍,以自動填充最低和最高文章ID。</li>
<li>跳過沒有<img>的文章(可選)。</li>
<li>排除圖像擴展名(逗號分隔,例如.svg、.gif)。</li>
<li>乾跑(瀏覽器和WP-CLI)顯示可點擊的文章ID,文章標題,文件名和詳細的舊→新的alt替換。</li>
<li>僅處理至少有一個圖片附件的文章。</li>
</ul>
</li>
</ul>
```
### 問題與答案:
1. 什麼是Image Alt Sync插件的主要功能?
- 答:Image Alt Sync插件主要功能是掃描選定的文章並更新文章內包含的圖片標籤的alt屬性,讓其替換為附件的_wp_attachment_image_alt值。
2. 在Image Alt Sync中,如何決定替換alt屬性的優先順序?
- 答:如果圖片在媒體庫中,它會優先選擇附件的Alt文本;如果未設置附件alt,則會回退到圖像文件名(無擴展名)或文章標題。
3. 可否跳過在媒體庫中找不到的圖像?
- 答:是的,Image Alt Sync插件提供可選功能以跳過在媒體庫中找不到的圖像。
4. 如何預覽更改而不保存?
- 答:可選擇啟用乾跑模式,在不保存的情況下預覽更改。
5. 如何使用WP-CLI進行Image Alt Sync的操作?
- 答:從WordPress根目錄運行以下命令:
```
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"
```
原文外掛簡介
Image Alt Sync scans selected posts and updates any 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 (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 [email protected]
Usage
Choose your filters (date range, min/max post ID, or “Apply to all posts”).
Set Batch size and optional Delay between batches to throttle load.
Choose a Date Range, or click a shortcut button (autofills Date after/Date before).
(Optional) Enter Lowest/Highest Post ID or click the quick-fill buttons.
(Optional) Check Skip posts without .
(Optional) Enter Exclude extensions like .svg,.gif.
Optionally enable Dry run to preview changes without saving.
Click Start. Progress and detailed per-post changes appear in the log.
If 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.
Usage (WP-CLI)
From your WordPress root:
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"
Args
– --status= publish|pending|draft|any (default: publish)
– --after= YYYY-MM-DD (optional)
– --before= YYYY-MM-DD (optional)
– --batch-size= integer (default: 100)
– --delay= seconds (float, default: 1)
– --dry-run flag (no changes saved if provided)
– --low-id= minimum post ID (optional)
– --high-id= maximum post ID (optional)
– --skip-noimg= 1|0 (default 0)
– --exclude-ext= comma-separated list like .svg,.gif
Credits
Crafted with ❤️ for accessible content.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Image Alt Sync」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
PW WooCommerce Bulk Edit 》PW WooCommerce Bulk Edit 是一個更新 WooCommerce 產品目錄的強大工具。, , 即時預覽 - 在儲存前可以看到即將更改的內容。不再有意外!, 除了批量編輯外,還...。Bulk menu creator 》, , , , , 一次建立多個選單項目, 從多行文字建立選單項目, 您可以每行提供一個標籤, 使用 2 個空格縮排以建立子項目, 您可以每行提供一個網址,它們會自動一...。
Seraphinite Post .DOCX Source 》透過這款外掛,您可以以 .DOCX 格式自動轉換為所有 WordPress 文章屬性的內容,讓您節省時間。詳細使用方法請參考此處。, 要使用免費的附加功能,請遵照畫面...。
Export Users Data to CSV 》中文翻譯:, En:, 將用戶數據和元數據導出為 csv 文件。, 歡迎提出評論和建議。, Ru:, 該外掛用於導出用戶數據。, 歡迎提出評論和建議。, 作者:Penzin Konst...。
CSV Importer Improved 》這個 WordPress 外掛可將 CSV(逗號分隔值)檔案中的文章匯入到您的WordPress部落格中。當您需要從Excel文件或類似文件匯入一堆文章時,它非常有用,只需將文...。SVG Color Changer 》<html>, <ul>, <li>外掛功能:允許使用者逐個或批次更改上傳的SVG文件中的顏色,非常適合品牌色更新或白色標籤解決方案。</li>, <...。
Import Members from CSV for Paid Memberships Pro 》我們設計了這個外掛,以確保在將使用者/成員導入 WordPress/Paid Memberships Pro 網站時不會出現錯誤。, 它支援新增和更改使用者資料。, 不同於 Paid Member...。Batch Update Media Informations 》這個外掛可以讓你一次更新多個媒體檔案的標題、描述、檔案名稱等等。, 當你需要更新一個龐大的媒體庫時,這個外掛尤其實用。, , 可以輸入多個媒體 ID,用逗號...。
Upload Unzipper 》Upload Unziper 可以讓您上傳 zip 檔案並解壓縮,每個檔案都會正確附加到當前的文章。, 它是基於 James Revillini 的現已失效的 just-unzip,並且在以下方面...。
SyntaxHighlighter Evolved: Batch Brush 》此外掛為 SyntaxHighlighter Evolved 增加了 Batch 語言支援。。
Product Batch for WooCommerce 》Product Batch for WooCommerce 可使已訂購的產品項目與批次代碼進行關聯,以便在需要撤回產品或有某個批次缺少零件的情況下進行追蹤。透過在「WooCommerce->...。
MCRPD Regenerate Download Permissions for woocommerce 》總結:MCRPD Regenerate Download Permissions 是一個專門用於需要重新生成過去訂單下載權限的工具,與 WooCommerce 預設工具不同,此外掛能夠針對特定產品、...。Map Navigator 》此外掛將地圖導航文件導入您的WordPress網誌中。, 地圖導航文件定義了一個或多個大陸、國家、地區、州和城市。, 此外掛會建立帶有MapPress地圖或 Mashup 的文...。
Smart Spam Cleaner 》<!DOCTYPE html>, <html>, <head>, <title>Smart Spam Cleaner Introduction</title>, </head>, <body>, , <h...。mobile batch 》這是一個方便的小型外掛,可讓您從手機批次上傳照片到 WordPress 文章中。, 這非常有用,因為手機應用程式通常在上傳大量或大型(或二者皆有)圖片時會出現一...。
