Currently you can only serve up an image that is publicly accessible, e.g. i = ui.image("https://github.com/deephaven.png"). If you try and serve up a local image to the container, you'll just get an error because the path will not be local to the client.
We should be able to use a local image.
E.g. you should be able to specify: i = ui.image('./plugins/ui/docs/_assets/text_filter_table.png') and it should just magically work.
Note there is a workaround currently by base64 encoding the image:
import base64
from deephaven import ui
with open("./plugins/ui/docs/_assets/text_filter_table.png", 'rb') as f:
file_content = f.read()
b64_image = ui.image(f"data:image/png;base64,{base64.b64encode(file_content).decode()}")
Currently you can only serve up an image that is publicly accessible, e.g.
i = ui.image("https://github.com/deephaven.png")
. If you try and serve up a local image to the container, you'll just get an error because the path will not be local to the client. We should be able to use a local image. E.g. you should be able to specify:i = ui.image('./plugins/ui/docs/_assets/text_filter_table.png')
and it should just magically work.Note there is a workaround currently by base64 encoding the image: