Can Deno Jupyter output images like jpegs?
Docs aren't super clear about this. I naively thought this would work:
But it just does normal console.log of the object.
5 Replies
It can but you have to give it on the right format, I think it needs a base64 encoded image, I'll have to lookup how I used to do this
Seems closer. I get a broken image icon with this.
url
works if I paste in the browser.
Ah it's just the plain base64 string, no data url.
Admitedelly we should have a helper API to display and images like we do for markdown or html
GitHub
feat(jupyter): Add
Deno.jupyter.image
API by bartlomieju · Pull R...Added an API for quickly displaying images:
const data = Deno.readFileSync("./my-image.jpg");
Deno.jupyter.image(data);
Thanks