Please help us by completing this survey

Go to survey
Documentation

Docs / Concepts / Image Field

Image Field

Image Field is a field type that is used to handle an image attached to the content. It handles images either as references or binary field content.

The field has two modes depending on how the image is stored in relation to the content:

Image can be uploaded and attached to a content using the Image Field Control. Switching between modes can also be done through the Image Field Control.

Field handler

Usage in CTD:

<Field name="ImageRef" type="Reference">
...
</Field>
<Field name="ImageData" type="Binary">
...
</Field>
<Field name="Avatar" type="Image">
  <Bind property="ImageRef" />
  <Bind property="ImageData" />
  ...
</Field>

Note that the Image field is a composite field and it embodies a Reference Field and a Binary Field. These two fields are technical fields and do not have to be presented by contentviews.

Supported Field Controls

Configuration

Example

CTD example

<Field name="ImageRef" type="Reference">
  <DisplayName>Avatar image (reference)</DisplayName>
  <Configuration>
    <VisibleBrowse>Hide</VisibleBrowse>
    <VisibleEdit>Hide</VisibleEdit>
    <VisibleNew>Hide</VisibleNew>
    <AllowMultiple>false</AllowMultiple>
  </Configuration>
</Field>
<Field name="ImageData" type="Binary">
  <DisplayName>Avatar image (binarydata)</DisplayName>
  <Configuration>
    <VisibleBrowse>Hide</VisibleBrowse>
    <VisibleEdit>Hide</VisibleEdit>
    <VisibleNew>Hide</VisibleNew>
  </Configuration>
</Field>
<Field name="Avatar" type="Image">
  <DisplayName>Avatar</DisplayName>
  <Description>Avatar image of user.</Description>
  <Bind property="ImageRef" />
  <Bind property="ImageData" />
  <Configuration>
    <Visible>true</Visible>
  </Configuration>
</Field>

The above example is an excerpt from the User Content Type CTD. The Avatar field incorporates the hidden ImageRef and ImageData technical fields.

Is something missing? See something that needs fixing? Propose a change here.