Skip to content

Image

The Image component is used to display images and can be used with fields of type binary.

<field name="logo" widget="image" />

If you only want to show the image withou controls you can use the widget props showControls to false:


v2.33.0

<field name="logo" widget="image" widget_props="{'showControls': false}" />

Show an icon

You can show an icon instead of the image if the using the name of the icon as the value of the name. See the Icon component for more information.

<group>
<image name="email" />
</group>

Dynamic icons

v2.33.0

You can also use a dynamic icon if the value instead to be a base64 string is the name of the icon. This is useful when you want to show an icon based on the value.

<field name="status" widget="image" />

In this case the value of the field status is warning and the icon will be

API

PropertyDescriptionTypeDefaultVersion
nameName of the field to get the value for the image (binary or icon) or name of the iconstring--
widget_propsExtra properties for the widgetobject--

Widget props

PropertyDescriptionTypeDefaultVersion
showControlsShow the controls of the imagebooleantrue v2.33.0