Field Render

Display an Image Selector field.

Field Group

Field Settings

Setting nameDescription
Image GalleryUpload or choose any existing attachments
Custom ImagesAdd additional custom images manually. Enter each choice on a new line. Can be an image url or attachment ID.
Default ValueEnter each default value on a new line
Images SizeChoose the default image size
ContainerChoose the image container width, height and border size
Return ValueChoose to return the images array, URL, or ID
Allow Null
Allow to toggle values
Select multiple values
Allow to select multiple values
LayoutChoose between the horizontal or vertical layout

Field Value

Value can then be retrieved using the common get_field() function. Usage example:

$slug = get_field('image_selector');

// https://www.domain.com/my-image.jpg