RowanWeb Image Select for ACF

Description

Sometimes a select field is really a choice between pictures: a quote author, a team member, a layout preset, a badge. With a plain select you store a slug and then map it to an image somewhere in your theme. With an Image field you end up searching the media library for the same photo again and again.

Image Select fixes that. You define the choices once, in the field settings — an image from the media library, a value, a label and any extra fields you need (for example “Position”). Editors then simply click the picture they want, and the post stores only the value, just like a regular select.

  • Visual choices editor — build the list of choices in the field settings, picking images from the media library. No URLs or attachment IDs to type in.
  • Extra fields per choice — attach your own data to each choice (position, link, short text) and get it in your template together with the image.
  • Two appearances — a grid of image cards for short lists, or a searchable dropdown with thumbnails for long ones.
  • Stores the value, like a select — switch an existing Select field to Image Select, add images to the same values, and all existing posts keep working.
  • Flexible return format — value, label, image ID, image URL, or an array with everything at once.
  • Works with free ACF — no ACF PRO features required. Also works with ACF PRO and Secure Custom Fields, including inside Repeater, Flexible Content, Group and ACF Blocks.

Requirements

This plugin needs Advanced Custom Fields (free or PRO) or Secure Custom Fields to be installed and active.

External services

This plugin connects to the following third-party service. Nothing else is sent anywhere by the free version.

Freemius (optional opt-in, licensing and updates of the Pro version)

The plugin includes the Freemius SDK, which handles licensing and updates of a separate Pro version. In this free version, Freemius only shows an optional opt-in screen after activation.

  • When: only if you choose to opt in (or activate a Pro license).
  • What is sent: your site URL, WordPress and PHP versions, plugin version, site language, and the admin’s name and email address, plus plugin activation/deactivation/uninstall events. If you skip the opt-in, nothing is sent.
  • Freemius Terms of Service, Privacy Policy and details on what is collected.

Support

Questions, bug reports or feature requests: the plugin’s support forum on WordPress.org, or https://rowan-web.ru/en/

Screenshots

Installation

  1. Upload the rowanweb-image-select-for-acf folder to /wp-content/plugins/, or install the plugin from the Plugins screen.
  2. Activate the plugin.
  3. In a field group, add a field and choose Image Select as its type.

FAQ

Does it need ACF PRO?

No. The field works the same way in free ACF, ACF PRO and Secure Custom Fields.

How do I use it in a template?

With the “Array” return format, get_field() returns everything about the selected choice:

$author = get_field( 'author' );
echo wp_get_attachment_image( $author['image_id'], 'thumbnail' );
echo esc_html( $author['label'] . ', ' . $author['extra']['position'] );

The array contains value, label, image_id, url, alt, width, height, sizes and extra (your extra fields). Whatever the return format is, rwis_get_choice( 'author' ) returns the same array, and rwis_get_choices( 'author' ) returns all choices of the field. The REST API always returns the full array.

What is saved in the database?

Only the value (slug) of the selected choice, or an array of values when multiple selection is enabled — exactly like the built-in Select field.

Can I turn an existing Select field into Image Select?

Yes. Change the field type to Image Select: the existing choices and default value are carried over with the same values, so posts that already have a value keep it. Then add an image to each choice.

Is there a Pro version?

Yes. In the free version extra fields are presets: the same value for every post that uses the choice. Pro adds “Editable in post” for an extra field: the value from the choice becomes a default, and editors can write their own text in each post — for example, a different quote every time from the same author with the same photo and position. Pro also shows ready-to-paste template code in the field settings, built from the field’s name, return format and extra fields.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“RowanWeb Image Select for ACF” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.1.0

  • Initial release.