The “Image” element is used to display an image on the screen or page. To use an image, you can import an image from the local storage media or an external image that you can access from the URL. You can also use an image that is stored in the database in binary format.
In the application, images are used as a symbol, illustration, company logo, icon for a functionality, etc. You can use the images in varieties of formats such as PNG, JPFG, GIF, etc.
|When to use||When not to use|
|You can use the image:|
–> To display it as a background skin for a widget.
–> As a company logo.
–> For common functions such as mail, delete, task completion, task failure, downloading, etc.
|–> Do not use the distorted image.|
–> If the image does not relate to the context.
–> Avoid the overdone images.
On the “Image” element, you can perform the following configurations:
- UI Configuration
- Event Configuration
For the “Image” element, you can configure the following UI properties:
|Tab||Property Name||Description||Mandatory||New Default Value||Visibility Rules|
|Basic||Reference Name||Specifies a unique name of the element. At the application level, an element is identified and managed by the reference name.||Yes||Image_1|
|Basic||Image Type||Allows you to choose the type of image- Icon or Letter||No||Icon|
|Basic||Image Source||Helps you configure the source location from where the application fetches the image and then displays it. You can configure the source location by using the two following options:|
–> None:- Click this option when you want to display the hardcoded image instead of defining the source location to fetch the image.
–> URL:- Click this option when you want to fetch the image from a specific URL-based location. After you select this option, the Enter Image URL box appears.
–> Asset Library:- Click this option when you want to fetch the image from the Assets Manager module. After you select this option, the Select Asset box appears.
|Basic||Enter Image URL||This box appears after you select URL in the Image Source list. In this box, enter the URL to load the image file from a specific URL location. You can upload the image in the following file formats:|
|No||If Image Source = URL|
|Basic||Select Asset||Allows you to fetch the image from the Assets Manager module. To fetch the image:|
–> In the Select Asset box, click icon (), and the Select Asset dialog box opens.
–> In the Select Asset dialog box, find the image and then select it.
–> After you select the image, click Select, and the Select Asset box displays the path of the selected asset.
–> Thus, you successfully configure the image from the Assets Manager module.
You can upload the image from the Assets Manager in the following file formats:
|Yes||No File Selected||if source = Assets|
|Basic||Visible||Allows you to define the default visibility of the UI element.||No||marked|
|Basic||Enable||Allows the user to enable/disable an element. You can decide whether the element needs to be clickable and usable.||No||marked|
|UI Properties||Styles||Allows you to select a specific style for the element from the list of pre-defined styles. The vDesigner module offers pre-defined styles that you can apply to the element.||No||Default|
|UI Properties- Background||Color||Click in the Color box and then define the color of the image?s background.||No||E0E0E0||if image type = letter|
|UI Properties- Background||Opacity||Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency.||Yes||100%|
|UI Properties- Alignment & Spacing||Margin||Allows you to desirably define margin around each side of the element. It provides four different boxes to define the margin outside the right, left, top, and bottom border of the element.||No||Theme Variable (Margin)|
|UI Properties- Alignment & Spacing||Element Alignment||Click this list to align the element as follows:|
–> Top Right
–> Top Left
–> Bottom Right
–> Bottom Left
|UI Properties- Shape & Decoration||Type||Under the Shape and Decoration section, this property has the two following options:|
Autofill:- If you select this option, you cannot change the element’s dimensions. When you drag the element to the canvas, this option is selected by default.
If you select Auto Fill, vDesigner places the element with the default dimensions.
Manual:- If you select this option, you can change the dimensions of the element.
|UI Properties- Shape & Decoration||Width Value||Enter the width of the element in the percentage or pixel unit.||No||108px|
|UI Properties- Shape & Decoration||Height Value||Enter the height of the element in the pixel unit.||No||108px|
|UI Properties- Shape & Decoration||X||Allows you to move the element along the X-axis; when the value increases, the element moves from left to right.||No||Show & Disable|
|UI Properties- Shape & Decoration||Y||Allows you to move the element along the Y-axis; when the value increases, the element moves from top to bottom.||No||Show & Disable|
|UI Properties- Shape & Decoration||Fit Type||Allows you to configure the size of the icon (image of the icon) in the container based on the following options:|
It expands the width of the image in the image container to maintain the aspect ratio. After applying this option, the height of the image may be cropped in the image container.
After you select this option, it stretches the width and height of the image to fit the image in the image container.
After you select this option, it may resize the image to fit it in the image container to maintain the aspect ratio.
|UI Properties- Shape & Decoration||Border Radius||Allows you to define the radius of any of the corners of the element. Defining the radius of the corner makes the corner of the element round.||No||Theme Variable (Border Radius)|
|Data||Entity Path||This property allows you to map an attribute to the element. You define the JSON based attributes in the entity in the Data Modeler module.|
To define the entity path:
–> Click in the Entity Path box, and a list expands.
–> The list displays several attributes from the entity.
–> In the list, select an attribute to map it to the element.
After the user performs the function on the element, the application can perform the following functions:
a. Fetches data from the attribute and then displays it in the element.
b. Stores data in the attribute.
|Data||Error Image||You can use this property to configure an error image. The error image is used to display a specific error.|
To configure an error image, you can use the following options:
i. When you select this option, the Enter Image URL box appears.
ii. In the Enter Image URL box, enter the image’s URL.
The application will access the URL to display the error image to the user.
–> Asset Library:
i. When you select this option, the Select Asset box appears.
ii. In the Select Asset box, click the asset library icon (), and the Select Asset dialog box opens.
iii. In the Select Asset dialog box, select an image and then click Select, and you successfully configure the image as an error image.
On the “Image” element, you can configure the following event: