How to embed image or picture in jupyter notebook, either from a local machine or from a web resource?

后端 未结 15 1206
天命终不由人
天命终不由人 2020-11-30 16:12

I would like to include image in a jupyter notebook.

If I did the following, it works :

from IPython.display import Image
Image(\"img/picture.png\")
         


        
15条回答
  •  青春惊慌失措
    2020-11-30 16:53

    1. Set cell mode to Markdown
    2. Drag and drop your image into the cell. The following command will be created:

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

    1. Execute/Run the cell and the image shows up.

    The image is actually embedded in the ipynb Notebook and you don't need to mess around with separate files. This is unfortunately not working with Jupyter-Lab (v 1.1.4) yet.

    Edit: Works in JupyterLab Version 1.2.6

提交回复
热议问题