Hello, I’m an absolute beginner in Genie.jl and in web stack in general. I want to build a webpage which periodically generates a random picture using some julia code, and displays it.
To begin, I want to simply display a picture in the browser. The picture
pic.png is my root folder. When I do
route("/") do html("<img src=\"pic.png\"/>") end
the picture does not appear in the browser. Could someone help me understand solving this basic task ?
Related question. Suppose that I have a Julia function
generate which generates a picture in the form of an RGB array (or any other image format supported by Julia, or a Plots object, etc).
In my webapp, I basically want to call this function, collect the output
x = generate(), save it in a file and display the result in an html page.
Is there a way to do this without saving the picture, but to directly embed
pic into the html ?