跳到内容

Make it Srcset

v2.0

Samuel Brynolf · 2016年4月8日 上架

Wordpress already uses srcset now. What I missed out was a simple way to handle and customize the sizes attribute—in my opion what makes srcset so eff …

正在使用
10+
评分
暂无
累计下载
6,092
最近更新
2017年5月10日
需要 WordPress 4.4.0+已测试到 4.7.40

贡献者

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

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums