Add local image to DASH
ErwanPiR opened this issue · comments
Hi,
I am trying to add in a div a local image. Looking at documentation, it seems that the way to do it is to use get_url_asset. But in my case I get this error
ERROR: type DashApp has no field get_asset_url
Is there a way to do it in jula version of Dash ?
Here is the documentation page for static assets https://dash.plotly.com/dash-enterprise/static-assets
Here is another discussion that mention the get_asset_url solution https://community.plotly.com/t/adding-local-image/4896
I use the 0.1.3 version of Dash
Thank you for your help (and for the work on dash for julia :))
I am also looking for a solution to add local images to my App. Dash, DashCoreComponents and DashHtmlComponents dont know get_asset_url().
If you checkout this page under the section Embedding Images in Your Dash Apps, they show an example of using a relative path (e.g., html_img(src="/assets/img.png")
) as the image src
. There is also an example of using a base64 encoded data:URI as the source for an HTML img
element. I tested both methods and they appear to work.
Using Dash v0.1.3.
Thanks a lot @chaseleslie for your answer. It works for me :)
I therefore close the subject.