內容簡介
此外掛提供 shortcode 和範本標籤功能,可透過附件 ID 取得 srcset 圖片。這是用來補充 WordPress 內建的 srcset,後者當然只能針對 the_content 圖片和設定中設定的媒體尺寸進行調整。有時您的設計需要更多,或者您正在使用其他方式放置圖片,而不使用 the_thumbnail 或 the_content。例如,我經常使用進階自訂欄位來根據 ID 抓取圖片。
生成的標記依據一組自訂圖片尺寸和由您設定的 (srcset-)sizes 屬性構建。使用設定頁面設定預設值,並隨時在 shortcode 或範本標籤中覆寫這些值。
選項:透過媒體上傳按鈕生成 shortcode
選項:啟用簡單的燈箱功能
選項:啟用怠惰加載。選項:包括 Picturefill
完整文檔請見 WordPress 外掛:Make it Srcset
外掛標籤
開發者團隊
原文外掛簡介
Enables shortcode and a template tag to pull srcset-images by attachment-ID. This is way to complement WordPress built in srcset which (of course) focus on the_content images and media-sizes set in settings. Sometimes your layout demands more, or you are using other ways to put images on your site not using the_thumbnail or the_content. For example, I use Advanced Custom Fields a lot pulling images by ID.
Generated markup are built from a set of custom image-sizes and the, by you configured, (srcset-)sizes attribute. Use the settings-page for default values and override them any time in the shortcode or template tag.
Option: Generate shortcodes by the mediauploader-button.
Option: Enable simple lightbox functionality.
Option: Enable lazhyloading. Option: Include Picturefill
Full documentation at WordPress plugin: Make it Srcset
