Static Image
The Static Image widget, which is not supported by the React client added to Mendix in 10.7, can be converted to an Image widget through the context menu of the widget when the React client is enabled.
For more information, see the Mendix React Client’s Migration Guide.
Introduction
The Static image widget can be used to show a static image on a page, layout, or snippet.
For example, you can configure an image clicking which a page with customer details opens:
Properties
An example of static image properties is represented in the image below:
Static image properties consist of the following sections:
Common Section
Design Properties Section
Events Section
For information on the Events section and its properties, see On Click Event and Events Section.
General Section
Image
The file name that this widget shows. For more information on when to use images and supported formats, see Images.
Width Unit
The width of an image. Possible values of this property are described in the table below:
Value | Definition |
---|---|
Auto (default) | The width of the given image is used. |
Pixels | The width is specified in a number of pixels. If you specify both width and height, the image will be scaled automatically: the proportions will be kept, the picture will not be stretched. |
Percentage | The width is specified in a percentage of the original width. It can be larger than its original width in which case the image is stretched |
Width
Specifies the width of the image in pixels or percentage. This option is displayed only when Pixels or Percentage are selected for the Width Unit described above.
Default: not applicable
Height Unit
The height of an image. Possible values of this property are described in the table below:
Value | Definition |
---|---|
Auto (default) | The height of the given image is used. |
Pixels | The height is specified in a number of pixels. If you specify both width and height, the image will be scaled automatically: the proportions will be kept, the picture will not be stretched. |
Percentage | The height is specified in a percentage of the original height. It can be larger than its original height in which case the image is stretched. |
Height
Specifies the width of the image in pixels or percentage. This option is displayed only when Pixels or Percentage are selected for the Width Unit described above.
Default: not applicable
Responsive
This property influences how the image scales. If the value is ‘Yes’, the image will never get bigger than its original size. It can become smaller. If the value is ‘No’, the image can become both larger and smaller than its original size.
Default: Yes
Visibility Section
Visibility determines whether a widget is displayed to the end-user as part of the page.
For more information on properties of this section, see the Visibility Section section in Properties Common in the Page Editor.
Converting to a Dynamic Image
You can convert a static image to a dynamic image that allows you to display dynamic data. For more information on dynamic image and its properties, see Dynamic Image.
To convert an image widget into a dynamic image, do the following:
- Select the Static image widget on a page and right-click it.
- From the list of actions, select Convert to dynamic image.
The Static image widget is converted to the dynamic image and you can configure it.