A static image (JPEG / PNG) can be displayed in the parametrization of an editor to, for example, provide additional context to help users fill in certain input fields.
Assume a folder structure as shown below:
│ └── viktor.png
viktor.png can be displayed in the parametrization by referencing to it in the app code using an
img = Image(path="viktor.png")
path is relative with respect to the assets_path which can be named arbitrarily and should be defined in
assets_path = "assets"
Note that the assets directory does not support nesting of directories.
You can tweak the visual by specifying one or multiple of the following attributes:
align: Alignment within the parametrization component ("left" | "center" | "right")
caption: A caption which is shown underneath the image
flex: Width of the image as percentage of the total parametrization width
max_width: A maximum width (pixels) can be set to make sure an image is not stretched beyond illegible boundaries
Show/hide an image depending on user selection
There may be cases where the user needs to be informed differently depending on a previous choice. An
have a dynamic source, however it is possible to use its visibility to show/hide a