Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

I would like to include an image in a Jupyter notebook.

If I did the following, it works :

from IPython.display import Image 

Image("img/picture.png")

But I would like to include the images in a markdown cell and the following code gives a 404 error :

![title]("img/picture.png")

I also tried

![texte]("http://localhost:8888/img/picture.png")

But I still get the same error :

404 GET /notebooks/%22/home/user/folder/img/picture.png%22 (127.0.0.1) 2.74ms referer=http://localhost:8888/notebooks/notebook.ipynb

1 Answer

0 votes
by (106k points)

You mustn't use quotation marks around the name of the image files in markdown!

If you carefully read your error message, you will see the two %22 parts in the link. That is the HTML encoded quotation mark.

You have to change the line

![title]("img/picture.png")

to

![title](img/picture.png)

Related questions

Browse Categories

...