jw-image
The schema defines the following properties:
Property | Type | Required | Description |
type | widget.image | true | |
instanceId | InstanceId | Expression | false | |
options | Image Widget Options | true | |
Properties of the options object:
Property | Type | Required | Description |
footer | string | Expression | TextWithFormat | TextLocale | false | Footer text of widget |
footerAlign | enum<string> | false | Footer text align |
placeholders | object[] | false | Widget specific placeholders config |
height | number | false | Change constrain of image height. Remember to use a proper resizeMode toachieve the best results in all different device resolutions |
resizeMode | ResizeMode | false | Determines how to resize the image when the frame doesn't match the rawimage dimensions.'cover': Scale the image uniformly (maintain the image's aspect ratio)so that both dimensions (width and height) of the image will be equalto or larger than the corresponding dimension of the view (minus padding).'contain': Scale the image uniformly (maintain the image's aspect ratio)so that both dimensions (width and height) of the image will be equal toor less than the corresponding dimension of the view (minus padding).'stretch': Scale width and height independently, This may change theaspect ratio of the src.'center': Scale the image down so that it is completely visible,if bigger than the area of the view.The image will not be scaled up. |
source | Source | true | The image source (either a remote URL or a local file resource).This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments.The native side will then choose the best uri to display based on the measured size of the image container.A cache property can be added to control how networked request interacts with the local cache.The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only). |
isContentOverlaid | boolean | false | If content like jc-titles are overlaid over the image content (overlay) |
top | false | Top part of widget | |
bottom | false | Bottom part of widget |
Footer text of widget
Footer text align
This element must be one of the following enum values:
- left
- right
- center
Widget specific placeholders config
The object is an array with all elements of the type object.
The array object has the following properties:
Determines how to resize the image when the frame doesn't match the raw image dimensions.
'cover': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).
'contain': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
'stretch': Scale width and height independently, This may change the aspect ratio of the src.
'center': Scale the image down so that it is completely visible, if bigger than the area of the view. The image will not be scaled up.
Default: "cover"
The image source (either a remote URL or a local file resource).
This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best uri to display based on the measured size of the image container. A cache property can be added to control how networked request interacts with the local cache.
The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only).
Properties of the source object:
Property | Type | Required | Description |
uri | string | string | false | |
The object must be any of the following types:
Top part of widget
The object must be any of the following types:
Bottom part of widget
The object must be any of the following types:
The schema defines the following additional types:
This element must be one of the following enum values:
- contain
- cover
- stretch
- center