Bixby Developer Center

Guides
References

url

requiredvalue optional

URL of the image.

Examples

url ("http://foo.com/bar.jpg")
url (pencil.png)
url ("[#{value(this.images[0].url)}]")
Note

If you need to display an image from raw data that is generated inside a capsule action, you can do so by using a data URL. For more information, you can read about the "data" URL scheme RFC.

Here is an example using an SVG. Embed the image by converting the image data to an image source, prefix image with data, and use base64 to encode the image string:

var url = `data:image/svg+xml;base64,${base64.encode(pureSvg)}`

In your view file, you would call the URL normally:

content {
section {
image {
url(this.url)
}
}
}

This is useful, for example, if you want to display the current stock prices in a stock market capsule.

Child Keys

dark-theme
optional
An image to use when the UI's dark theme is enabled
light-theme
optional
An image to use when the UI's light theme is enabled
macro
optional
Defines a layout, a portion of a layout, or a dialog with a macro
template
optional
Text to be passed
template-macro
optional
Encapsulates dialog logic that normally would lead to duplication