[WordPress] 外掛分享: RICG Responsive Images

首頁外掛目錄 › RICG Responsive Images
WordPress 外掛 RICG Responsive Images 的封面圖片
2,000+
安裝啟用
★★★★
4.7/5 分(20 則評價)
3032 天前
最後更新
問題解決
WordPress 4.0+ v3.1.1 上架:2015-01-16

內容簡介

這個 WordPress 外掛可以自動提供預設的響應式圖片。

此外掛會在上傳每個圖片時包含所有可用的圖片尺寸。每當 WordPress 透過媒體上傳器輸出圖片或是產生特色圖片時,這些尺寸會透過 srcset 屬性包含在圖片標籤中。

重要提示

自從 WordPress 4.4 版本,圖片預設就是響應式的。若您正在使用 WordPress 4.4 或打算升級到 4.4 版本,就不需要安裝這個外掛。

如果您在版本 2.5 之前已安裝此外掛,但是正在運行 WordPress 4.4 版本,重要的是您要繼續保留這個外掛。這是因為在 2.5 版本之前的所有版本都依賴圖片上存在 data-sizes 屬性,以提供所需的響應式標記。在這種情況下,如果移除外掛,則文章中的圖片將留下無效的標記。我們正在處理此問題,您可以在 https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/issues/178 上追蹤我們的進度。

您仍然可以使用此外掛進行高級圖片壓縮支援,或將其作為包含 picturefill script 的簡單方法。如果在您的安裝中偵測到支援響應式圖片,此外掛將會回退到 WordPress 預設功能。

版本 3.1.0 包括重要的更改,可使此外掛與 WordPress 4.4 版本兼容。建議您進行升級。

從版本 2.5.0 開始,此外掛會在前端為圖片添加 srcset 和 sizes 屬性,而非在文章中儲存的圖片標記中添加這些屬性。

完整的文件和貢獻者指南可在 Github 上找到。

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.1.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「RICG Responsive Images」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Bringing automatic default responsive images to WordPress.
This plugin works by including all available image sizes for each image upload. Whenever WordPress outputs the image through the media uploader, or whenever a featured image is generated, those sizes will be included in the image tag via the srcset attribute.
Important notes

As of WordPress 4.4, images are responsive by default. If you are on WordPress 4.4 or plan to update, you will not need to install this plugin.

If you have had this plugin installed since before version 2.5 but are running version 4.4 of WordPress, it is important that you leave the plugin installed. This is because all versions of the plugin before version 2.5 relied on a data-sizes attribute being present on an image in order to provide the responsive markup needed. If the plugin in this case is removed, then images in posts will be left with invalid markup. We are working to address this issue, and you can keep track of our progress here at https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/issues/178.
You can still use the plugin for advanced image compression support or as a simple way to include the picturefill script. The plugin will fall back to WordPress default functions if responsive image support is detected in your installation.

Version 3.1.0 includes important changes that make this plugin compatible with WordPress version 4.4. Upgrading is highly recommended.

As of version 2.5.0, the plugin adds srcset and sizes attributes to images on the front end instead of adding them to the image markup saved in posts.

Full documentation and contributor guidelines can be found on Github

延伸相關外掛

文章
Filter
Apply Filters
Mastodon