內容簡介
WordPress 6.0計畫新增一項功能,即預設生成 webp 圖片並使用。當上傳圖片時,會自動製作出每個圖片大小的 WebP 版本。根據建議書,其中一個缺點是除了原始的 JPEG 外,生成 WebP 版本會「增加約70%的儲存空間來存放兩種檔案類型」。雖然此功能對許多網站和訪客非常有益,但某些網站擁有者可能無法立即增加存儲空間以容納額外的檔案。詳細資訊請參閱該項建議書或 Trac ticket。
為了幫助網站擁有者管理這項轉換,此外掛在「設定 -> 媒體」下新增一個選項,可以啟用或停用 JPEG 的初始上傳時自動生成 WebP 版本的功能。對於多站點安裝,可以在網絡範圍內或個別站點上啟用這項功能。
*** 2022-07-22 更新 ***
儘管原始實現方案因社群反饋而未能合併到 6.0 版本中,但變更集 53751 (https://core.trac.wordpress.org/changeset/53751) 合併了一個更新的實現方案,解決了社群關注的部分問題(但不是全部)。此合併會成為 6.1 版本的一部分,除非需要進一步變更。某些網站擁有者可能無法立即應對其主機所需的儲存空間翻倍問題,因此此外掛的原始目標仍然有效。代碼已更新,在全局上禁用上傳時的WebP生成。還有一個新的 ticket 討論將此功能變成一個設定的可能性(請參閱 https://core.trac.wordpress.org/ticket/56263)。但是,鑒於 WordPress 的核心理念為「決策而非選項」,這很可能不會進行。
外掛標籤
開發者團隊
原文外掛簡介
*** 2022-09-12 UPDATE ***
@matt published a post and codified a final decision that WebP by default would not be coming to WordPress Core in version 6.1. That being the case, this plugin will not be necessary for users to prevent WebP generation by default as part of the Core upload process.
Proposed to be included in WordPress 6.0 is a new feature to generate and use webp images by default. Specifically, when an image is uploaded, a WebP version of every image subsize is created. According to the proposal, one downside is that generating WebP versions along with the original JPEGs will “use an additional ~70% of the storage space to store both file types.” Although this is hugely beneficial to most websites and, more importantly, their visitors, some site owners may not be immediately able to increase the size of their storage to accommodate the additional files. For more information, see the proposal or the Trac ticket.
To help site owners manage the transition, this plugin adds a setting under Settings -> Media to either enable or disable WebP creation on the initial upload of JPEGs. For Multisite installations, the plugin can be activated network-wide or on individual sites.
*** 2022-07-22 UPDATE ***
Although the original implementation was not merged in 6.0 due to community feedback, changeset 53751(https://core.trac.wordpress.org/changeset/53751) merged an updated implementation that addresses some(but not all) concerns from the community. This merge will be part of the 6.1 release, unless further changes are needed. Some site owners may not be able to immediately cope with doubling their required storage allotment with their host, so the original goal of this plugin remains. The code has been updated to disable WebP creation on upload globally. There is a new ticket discussing the possibility of making this feature into a setting(see https://core.trac.wordpress.org/ticket/56263). However, given WordPress’s core philosphy of “Decisions, Not Options”, it’s unlikely to proceed.
