Resize the image in jupyter notebook using markdown
Last Updated :
08 Feb, 2022
Markdown is a lightweight and popular Markup language. It is very similar to HTML (HyperText Markup Language). Markdown is mostly used by data analysts and data scientists to make their Jupyter Notebook more attractive, readable, and to give a website-like feeling to their notebook.
Note: We can not use markdown directly into jupyter notebook because it doesn't support HTML tag directly but however we can use with Markdown option for inserting/resizing images.
Markdown is used at creating/Inserting the following in the notebook:
- Headings
- Bold & Italic text
- Mathematical Symbols
- Blockquotes
- Line Break
- Horizontal Lines
- Ordered Lists
- Unordered Lists
- Internal and External Links
- Image
- Video
Insert and resize an Image
Create a notebook or open an existing notebook of type Python3 in Jupyter Notebook. Change the cell type as Markdown as shown below.

Insert an image using markdown language
We cannot change the size of the image using the markup, however, we can change its size using the HTML directly. We can use the img tag with width and height properties. We can specify either name of the image present in the local system or the URL of the image (link)
The syntax for img tag:
<img src="imagename/url" width="XXX" height="XXX">
Note: Make sure that the image you want to insert is in the same folder as jupyter notebook.
Run the cell by clicking the run button at the top or by keyboard shortcut shift+enter.
Example:
Python3
# this code is belong to markdown in jupyter
<img src="GFGImage.jpg" width="500" height="340">
<img src="GFGImage.jpg" width="200" height="500">
Output:
Explanation: Here we passed an image name that is in the local system to src and modified the width and height of an image.
Specifying the URL of image
Here we will use the image URL to insert the image in markdown.
Python3
<img src = https:GeeksforGeeks.svg/1200px-GeeksforGeeks.\
svg.png width = "200" height = "500" >
Output:
Explanation Here we passed URL which will be available at the top of your browser window of an image to src and specified the width and height of an image.
Similar Reads
How to Delete Markdown in Jupyter Notebook In this article, we will cover How to delete markdown in Jupyter Notebook we will discuss various methods to do the same. First, we look at what is Jupyter Notebook and markdown and why we use them, we discuss different methods to delete a markdown in Jupyter Notebook in this article. Jupyter Notebo
4 min read
How To Resize Image in GitHub Using Markdown? Markdown is a popular markup language that simplifies formatting text, commonly used in README files, wikis, and documentation across various platforms like GitHub. It provides a simple way to embed images but doesn't include built-in options to resize them directly. In this article, we will see the
3 min read
Configure Keyboard Shortcuts in Jupyter Notebook Jupyter Notebook is the original web application for creating and sharing computational documents that contain live code, equations, visualizations, and narrative text. It offers a simple, streamlined, document-centric experience. Jupyter has support for over 40 different programming languages and P
1 min read
How to Change the Theme in Jupyter Notebook In this article, we will cover how to change the theme in Jupyter Notebook. We will look at what is Jupyter notebook, the themes why we use them, and the different themes available in Jupyter Notebook we will look into examples along with the screenshots to get a better understanding. We will also s
3 min read
Using Jupyter Notebook in Virtual Environment In this article, we are going to see how to set Virtual Environment in Jupyter. Sometimes we want to use the Jupyter notebook in a virtual environment so that only selected packages are available in the scope of the notebook. To do this we have to add a new kernel for the virtual environment in the
2 min read
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 cellBy python code ( embedding an image in a code cell).Method 1: Direct insertion using the edit menu Step 1:
2 min read