Image

The Image field offers the ability to select existing images or uploading new ones with the WordPress uploader. When selected, a preview of the image appears beside.

image-field

Attributes

AttributesTypeRequiredDescription
idstringRequiredRequired. Unique ID identifying the field. It will be used as meta_key. Must be different from all other field IDs.
titlestringRequiredDisplays title of the option.
subtitlestringOptionalSubtitle display of the option, situated beneath the title.
descstringOptionalDescription of the option, appearing beneath the field control.
typestringRequiredValue identifying the field type. For Image field here we set value image
defaultarrayOptionalArray of default values.
– id (type: int, default value: 0) : image attachment id
– url: external url of the image attachment.
colintOptionalThe proportion of columns that display field on 12 columns per row.

 Example Declaration