该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Disable WebP By Default

描述

*** 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.

安装

  1. Upload the disable-webp-by-default folder to the plugins directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Control WebP generation with the new checkbox under Settings -> Media.

评价

2022 年 9 月 25 日
Thank you for your work with this plugin (and just keeping track and reporting all the latest WEBP changes, etc.). Great to find so much useful information in the plugin documentation. Very much appreciated!
2022 年 8 月 20 日
Thanks so much, like for so many, we are serving WEBP “On The Fly” via a CDN and have ZERO need for such Core functionality. How hard would it be for WP to give users a checkbox to disable this mess? Again, THANKS!
2022 年 7 月 29 日
Thank you for creating this plugin! It’s a shame it’s necessary, but I appreciate that you created it to make it easier for site owners to be able to take back control over their sites without needing to know how to add a filter.
阅读所有5条评价

贡献者及开发者

「Disable WebP By Default」是开源软件。 以下人员对此插件做出了贡献。

贡献者

「Disable WebP By Default」插件已被翻译至 1 种本地化语言。 感谢所有译者为本插件所做的贡献。

帮助将「Disable WebP By Default」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

0.7.0

  • Cleanup namespaces and scopes.

0.6.0

  • Code consolidation and cleanup.

0.5.0

  • Add new setting to control the WebP generation.

0.4.0

  • Remove “Network” flag in plugin header to allow for individual site usage in multisite.
  • Add mime check for JPEG before altering the outputs.

0.3.0

  • Update code to only remove the JPEG -> WebP transform, leaving the other default JPEG -> JPEG transforms in place. (Props @adamsilverstein)

0.2.0

  • r53751 compatibility update.

0.1.0

  • Initial release.