I have some plots that use ImageURL to display local images. When attempting to plot in Jupyter (in Chrome or Firefox), the images are blank and the console shows an “Not allowed to load local resource” error. I believe this has something to do with CORS policies? Anyway, since I’m only ever running this locally and don’t really care about security, is there any way to make it work? I know I can run a Bokeh server and mount the images as static resources, but I like the convenience of doing everything in Jupyter.
That’s a browser security restriction outside our control, I am afraid. Some options:
- Serve the images with some super simple server, e.g built-in
python -m http.server. That way the images have a real
http://URL instead of a
file://path. That should work.
- Load the images and convert them to RGBA arrays and use
Got it, thanks Bryan