How can one display images side by side in a GitHub README.md? – Dev

The best answers to the question “How can one display images side by side in a GitHub README.md?” in the category Dev.

QUESTION:

I’m trying to show a comparison between two photos in my README.md which is why I want to display them side-by-side. Here is how the two images are placed currently. I want to show the two Solarized color schemes side by side instead of top and bottom. Help would be much appreciated, thanks!

ANSWER:

This will display the three images side by side if the images are not too wide.

<p float="left">
  <img src="https://stackoverflow.com/img1.png" width="100" />
  <img src="/img2.png" width="100" /> 
  <img src="/img3.png" width="100" />
</p>

ANSWER:

The easiest way I can think of solving this is using the tables included in GitHub’s flavored markdown.

To your specific example it would look something like this:

Solarized dark             |  Solarized Ocean
:-------------------------:|:-------------------------:
![](https://...Dark.png)  |  ![](https://...Ocean.png)

This creates a table with Solarized Dark and Ocean as headers and then contains the images in the first row. Obviously you would replace the ... with the real link. The :s are optional (They just center the content in the cells, which is kinda unnecessary in this case). Also you might want to downsize the images so they will display better side-by-side.

ANSWER:

Similar to the other examples, but using html sizing, I use:

<img src="https://stackoverflow.com/questions/24319505/image1.png" width="425"/> <img src="image2.png" width="425"/> 

Here is an example

<img src="https://openclipart.org/image/2400px/svg_to_png/28580/kablam-Number-Animals-1.png" width="200"/> <img src="https://openclipart.org/download/71101/two.svg" width="300"/>

I tested this using Remarkable.

ANSWER:

You can place each image side-by-side by writing the markdown for each image on the same line.

![alt-text-1](image1.png "title-1") ![alt-text-2](image2.png "title-2")

As long as the images aren’t too large, they will display inline as demonstrated by this screen shot of a README file from GitHub:

inline images