8

jupyterlab fails to display png image:

![title](image/filename.png)

results in showing only displaying the title.

I have the following installation

JupyterLab v0.35.4
Known labextensions:
   app dir: /anaconda3/envs/learnco_projects/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v0.38.1  enabled  OK
        @jupyterlab/toc v0.6.0  enabled  OK
        @mflevine/jupyterlab_html v0.1.4  enabled  OK
        @ryantam626/jupyterlab_code_formatter v0.1.9  enabled  OK
        jupyterlab-flake8 v0.2.4  enabled  OK

Thank for the help

osterburg
  • 447
  • 5
  • 24

2 Answers2

5

One easy way to display image on a Jupyter notebook is using HTML chunk of code in a Markdown cell, here is an example:

<img src='./image/filename.png'>Image description</img>

Once you run the cell, the image and its description text should appear in place of the HTML code.

EDIT

This works with jupyter lab and classic jupyter notebook.

swatchai
  • 17,400
  • 3
  • 39
  • 58
  • Question is about jupyterlab, and answer is about jupyter notebook. They are not identical and results vary. – Mark Andersen Sep 18 '19 at 17:46
  • 1
    @MarkAndersen This answer works fine in Jupyter Lab. Jupyter Lab suffers from the same propensity for broken image embeddings, and this answer fixed it for me. – rocksNwaves Oct 07 '20 at 18:38
0

Here is a solution:

1- Have the notebook open in JupyterLab. 2- Right-click on the tab of the notebook and select New View for Notebook

The new view of the notebook should load with all figures successfully loaded.

Cbraz
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 07 '22 at 11:20