I am developing a Dash.jl app and discovered that I cannot embed local pictures. One workaround I found is to somehow host images on a local server in order to display them, but I have no idea how to do that in Julia.
My idea was to serve a small html page with the image, and embed that in the Dash app by using it’s url, but I still can’t get the image to be displayed with HTTP. Here is a small example:
using HTTP
HTTP.serve("127.0.0.1", 8080) do request::HTTP.Request
try
return HTTP.Response("""<html>
<body>
<button type="button">Click Me!</button>
<h1>Some title</h1>
<img src=C:\\Users\\cioarca\\Documents\\x.png width="300" height="200">
</body>
</html>""")
catch e
return HTTP.Response(404, "Error: $e")
end
end
Any suggestion is highly appreciated.