這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP Enable WebP

外掛說明

This WordPress Plugin for WebP image uploads enabled WebP image uploads into the media library.

It will also add a class to the body tag for CSS selectors. This is helpful for setting background images.

Example:

selector {

background: url(‘images/example.jpg’);
}

body.supports-webp #selector {
background: url(‘images/example.webp’);
}

Use the function webpSupported() in template files to conditionally show WebP images.

Example:
if (webpSupported()) :
WebP image here
else:
Image with other fallback format here
endif;

Major features in WP Enable WebP include:

  • Enabling WebP Image uploads into the media library.
  • Browser detection that adds a class to the body tag indicating WebP is supported by the browser.
  • Helper function to use in theme template files to check if the browser supports WebP image format.

安裝方式

Upload the “wp-enable-webp” folder to your wp-content/plugins directory, then Activate it.

使用者評論

2023 年 1 月 7 日
Really good plugin. I now use that plugin for nearly a year. It helps to save webspace. It´s not updated for the newest WordPress version, but it still works without any problems or errors. Great work!
閱讀全部 7 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP Enable WebP〉的開發相關工作。

參與者

將〈WP Enable WebP〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0

Release Date – 19 December 2018
* Initial release