How to include two pictures side by side in Markdown for IPython Notebook (Jupyter)?
38,001
Solution 1
JMann's solution didn't work for me. But this one worked
from IPython.display import HTML, display
display(HTML("<table><tr><td><img src='img1'></td><td><img src='img2'></td></tr></table>"))
I took the idea from this notebook
Solution 2
You can create tables using pipes and dashes like this.
A | B
- | -
![alt](yourimg1.jpg) | ![alt](yourimg2.jpg)
see Tables syntax
Solution 3
I don't have enough reputation to add comments, so I'll just put my 2 cents as a separate answer. I also found that JMann's solution didn't work, but if you wrap his implementation with table tags:
<table><tr>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
</tr></table>
then it works.
Solution 4
I found the following works in a Markdown cell:
<tr>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
</tr>
Solution 5
Table of pictures :
|![alt](pathToImage1.jpg) |![alt](pathToImage2.jpg)|
|-|-|
|![alt](pathToImage3.jpg) | ![alt](pathToImage4.jpg)
|![alt](pathToImage5.jpg) | ![alt](pathToImage6.jpg)
View :
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on July 17, 2022Comments
-
Admin almost 2 years
I am trying to insert two pictures side by side in one Markdown cell on a notebook. The way I do it was:
<img src="pic/scan_concept.png" alt="Drawing" style="width: 250px;"/>
in order to be able to size the included picture. Can anyone gives suggestions on top of this?
Thanks,
-
Physbox over 5 yearsThe raw HTML code worked for me i.e. without
HTML
anddisplay
-
Markus Zeller over 4 yearsSadly fails on Github.
-
Krisztián Balla about 4 yearsWorks on Github.
-
d-man about 3 yearsThis worked for me using jupyter notebook (intentionally using html not
[img](url)
) -
Arthur Morris over 2 yearsThis works very nicely in jupyter notebook-based slides created with RISE