
內容簡介
Devenia Replace Media 外掛允許用戶在不創建新媒體庫項目的情況下,替換現有的 WordPress 附件。這樣可以在多個頁面上修正共享的媒體來源,簡化了媒體管理流程。
【主要功能】
• 替換媒體文件而不創建新項目
• 保留附件 ID 和相關聯的 WordPress 關係
• 自動更新附件的元數據和可用圖像尺寸
外掛標籤
開發者團隊
原文外掛簡介
Replace an existing WordPress attachment without creating another Media Library item or selecting a new attachment on every page.
Correct one shared source
A product photograph appears on a product page and two articles. If it needs correcting everywhere, open the existing Media Library item and choose Replace File. The pages continue to use the same attachment ID.
If one page must keep the old photograph, upload a separate attachment instead. Replacement changes a shared source; it does not create a per-page variation.
What is preserved
The attachment ID and WordPress relationships that refer to it.
The attachment title, caption, description and alt text. Review that text when the replacement changes its meaning.
The existing file path used for the replacement. WordPress image processing may generate a different full-size image when it scales, rotates or converts an image. Check the resulting URL and existing links.
WordPress regenerates attachment metadata and available image sizes. A smaller replacement may not recreate an old thumbnail size. Fixed thumbnail URLs in page HTML, CSS, external messages or exported pages are not rewritten automatically.
Where to find Replace File
Use the Media Library list, Edit Media screen or supported WordPress media dialogs. Elementor attachment details provide another entry point when Elementor is active. The normal Media Library workflow does not require Elementor or an AI client.
Prepare the replacement
Save a separate copy of the old file if you may need it again. Replacement does not provide a permanent revision history or an Undo button.
Prefer the same file format and prepare dimensions suitable for every placement. Although an allowed replacement type updates the recorded MIME type, a web server can infer the served type from the retained filename extension. A different format under an old extension is not a dependable conversion workflow.
Check caches and published pages
A changing v parameter is added to attachment and responsive image URLs produced through the supported WordPress filters. Each replacement gets a newer value, including repeated edits in the same second.
This does not purge every browser, page cache or CDN. Hard-coded URLs are not rewritten. Check representative pages and direct download links; clear the relevant cache or rebuild exported pages when needed.
Automation abilities
When WordPress Abilities API is available, two operations are registered:
media/replace-from-url requires attachment_id and url. The HTTP or HTTPS source must pass WordPress URL validation.
media/replace-base64 requires attachment_id, filename and base64. A base64 data URI is accepted. The decoded file must be no larger than 20 MiB; server request limits can be lower.
The account must have upload_files and permission to edit the selected attachment. Both operations use the same replacement function as the editor. A successful response includes the attachment ID, URL, MIME type, dimensions, version and message. A failed ability returns success: false with a message.
An MCP client needs a compatible connection to WordPress Abilities API. Automation is optional; replacing files through the Media Library works without it.
Read the product guide and WordPress documentation for image-size generation.
