Reputation: 191
I alread tried to add a picture by using a div container, but I always got a 404 error: "404 GET img/image.png (my-ip) 1.27ms".
What i'm doing wrong. Due to a similar issue on stackoverflow that method should work - I guess.
image_div = Div(text="<img src='img/image.png'>")
curdoc().add_root(image_div)
>> bokeh serve /dir/image.py --allow-websocket-origin=my-website:5006
Upvotes: 2
Views: 1042
Reputation: 34588
A browser 100% cannot load local filesytem paths from a remote server. The images must be hosted and served by a real web server, ie. they must have actual http
(or https
) URLs in the img
tag. You have three basic options:
static
subdirectory. Which one is best for you depends heavily on the particulars of your situation.
Upvotes: 2