跳到内容

Advanced Custom Fields: Image Size Select Field

v1.0.4

Jeremy Ross · 2018年11月30日 上架

Field to select registered image sizes within the WordPress dashboard.

正在使用
300+
评分
5.0 / 5
累计下载
7,288
最近更新
2026年8月22日
1 条评价需要 WordPress 3.6.0+已测试到 7.1.5PHP 7.0+

贡献者

截图

Advanced Custom Fields: Image Size Select Field

Field to select registered image sizes within the WordPress dashboard.

Compatibility

This ACF field type is compatible with:
* ACF 5

How to Use

Once activated, this plugin will create a Image Size field type in ACF. This field type will list all registered field types as a drop down within the field group.

To use this field within your custom templates you will use the following code:

$my_image_id   = get_field('my_image_id');    // ACF Image return type set to ID for this demo
$my_image_size = get_field('my_image_size');  // The selected image size (eg. large)

echo wp_get_attachment_image( $my_image_id, $my_image_size );  // Output the image based on the ID, and the Image Size selected.

Plums

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

导航

说明

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

© 2026 Plums