Thursday, October 2, 2025
HomeLanguagesInsert Image in a Jupyter Notebook

Insert Image in a Jupyter Notebook

In this article, we will discuss how to insert images in a Jupyter Notebook. There are a few ways to insert images. These are –

  • Direct insertion using the edit menu.
  • Embedding in a markdown cell
  • By python code ( embedding an image in a code cell).

Method 1: Direct insertion using the edit menu

Step 1:  This method is the easiest. first, change the type of the cell to  -> markdown.

Step 2: After that click edit in the jupyter notebook menu. after that click ‘insert image’. Edit -> insert image.

Step 3: After that, a dialogue box opens up and asks us to locate the file. Click on ‘ok’.

Final output:

Method 2: Embedding in a markdown cell

There are different ways to embed an image in markdown.  below is an example of direct embedding:

Python3




![SNOWFALL](snowfall4.jpeg)


Output:

Method 3: Using python code ( embedding an image in a code cell)

A code cell can also be used to embed images. To display the image, the Ipython.display() method necessitates the use of a function. In the notebook, you can also specify the width and height of the image.

Python3




# import image module
from IPython.display import Image
  
# get the image
Image(url="snowfall4.jpeg", width=300, height=300)


Output:

RELATED ARTICLES

Most Popular

Dominic
32330 POSTS0 COMMENTS
Milvus
85 POSTS0 COMMENTS
Nango Kala
6703 POSTS0 COMMENTS
Nicole Veronica
11867 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11926 POSTS0 COMMENTS
Shaida Kate Naidoo
6816 POSTS0 COMMENTS
Ted Musemwa
7078 POSTS0 COMMENTS
Thapelo Manthata
6775 POSTS0 COMMENTS
Umr Jansen
6774 POSTS0 COMMENTS