notebook
notebook copied to clipboard
Embedded images do not print if referenced as html
Describe the bug
Notebooks can have embedded images. These images work just fine if they are referenced via markdown. However if they are referenced using html they display fine but they do not print.
As an example, suppose that you have a notebook and that you insert in a cell an image named new.jpg. This gives you the following markdown:

that works just fine.
However if you try to use that figure changing the above into what should be the equivalent html (e.g. to get more control over the image size, centering, etc.) as in
<div><center>
<img src="attachment:new.jpg">
</center></div>
that works correctly on screen but when you try to print using the File->Print feature, the image is broken in the preview and in the printout.
The issue is present both with jupyter notebook and with jupyter lab.
As a workaround, because you are using html anyways, you can use base64 encoded images inline. This is extremely ugly when you expand the cell to edit it, but at least it works.