inline images from jupyter with quarto

why it works with jupyter labs but not completely with jupyter notebook
nbdev
quarto
Published

September 23, 2022

using jupyter lab

Here is the 1st image inline

image.png

and here the second one

image.png

if we see a the same image, we have a problem

using jupyter notebook

1st image

image.png

2nd image

image.png

if we see a the same image, we have a problem

analysis

when using jupyter lab, cell code for images are like that

![image.png](attachment:71a4fc95-5776-4180-ae3a-b815bbf1b7a0.png)

and with jupyter notebook or vscode, it is like that

![image.png](attachment:image.png)

There is an enhancement request at vscode to support it

https://github.com/microsoft/vscode/issues/151408

and quarto when creating _site, is saving these images in this structure:

!tree ../_site/posts/2022-09-23-inline-images-with-quarto_files/
../_site/posts/2022-09-23-inline-images-with-quarto_files/
└── figure-html
    ├── 71a4fc95-5776-4180-ae3a-b815bbf1b7a0.png
    ├── 74e0d8d8-ad0f-4eca-b52b-167ac518d0e9.png
    └── image.png

1 directory, 3 files

only one image.png for 2 files, that cannot work :(

workaround

use jupyter lab to blog