
內容簡介
將圖片大小調整為適合行動裝置的尺寸
WURFL Image Tailor (WIT) http://web.wurfl.io/#wit 是一個自動圖片轉換並提供服務的外掛,
使用 WURFL 設備偵測函式庫 http://web.wurfl.io/#learnmore。WURFL 會偵測設備和螢幕尺寸,
並根據設備和螢幕尺寸調整每個圖片的大小和優化程度。
此外掛會自動連結到 WordPress HTML 圖片代碼生成程序,並更改每個圖片的 src 屬性,以便針對特定的設備進行優化,並通過 WURFL Image Tailor 服務進行提供。
此外掛還會過濾文章內容,將其中所有圖片的 src 屬性替換掉。但目前它只會更改文章內出現的所有 (!) 圖片的 src 屬性,並未替換到指向媒體庫中的圖片的鏈結的 href 屬性。
使用 WordPress 函式和過濾器
請務必使用以下函式:
the_post_thumbnail(…)
wp_get_attachment_image(…)
the_content(…)
然而,請勿使用wp_get_attachment_image_src(),因為我們目前還無法鉤取進去!目前此外掛已鉤取至這些 WordPress 過濾器:
wp_get_attachment_image_attributes
the_content
適應性圖片
另外,可以參考 Adaptive Images for WordPress https://wordpress.org/plugins/adaptive-images/ 這個自行搭建的透明移動圖片解決方案。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Deliver downsized images to mobile devices
WURFL Image Tailor (WIT) http://web.wurfl.io/#wit is an automatic image transformation and delivery service, based on
the WURFL device detection library http://web.wurfl.io/#learnmore. WURFL will detect the device, and its screen size
and it will resize and optimize (downsize) each image accordingly.
This plugin hooks automatically into the WordPress HTML image code generation process and changes each image’s src
attribute, so that it is optimized for that specific device and delivered via the WURFL Image Tailor service.
The plugin also filters the post contents to replace the src attribute of images in it. But it currently does this for
all (!) images that it finds in the post contents. Right now it does not replace the href attribute of links that
point to images in the media gallery.
Use WordPress functions and filters
Make sure you use functions like:
the_post_thumbnail(…)
wp_get_attachment_image(…)
the_content(…)
However, do not use wp_get_attachment_image_src(), because we cannot hook into it (yet)! Right now the plugin hooks
into these WordPress filters:
wp_get_attachment_image_attributes
the_content
Adaptive Images
Also, checkout Adaptive Images for WordPress https://wordpress.org/plugins/adaptive-images/ a self-hosted, transparent mobile images solution.
