1

Hi i am trying resize the image in a .md file for the following code

![unsplash.com](./photo-1490474418585-ba9bad8fd0ea.jpg)

I have tried the following approaches but didnt work

![unsplash.com](./photo-1490474418585-ba9bad8fd0ea.jpg){width: 200px}

![unsplash.com](./photo-1490474418585-ba9bad8fd0ea.jpg =200x200)

I want to resize the image to 200px. Any help would be appreciated.

  • Possible duplicate of [Changing image size in Markdown](https://stackoverflow.com/questions/14675913/changing-image-size-in-markdown) – Waylan May 22 '19 at 01:33

2 Answers2

0

Have you tried to insert the HTML directly into the .md?

<img src="http://....jpg" width="200" height="200" />

Johnathan Coker
  • 71
  • 1
  • 10
0

You cannot style the image directly, however, a workaround is to enclose your image in a div. You can then do most of the styling on this div (sizing and positioning) using either inline CSS or a class that you can reference on a global css. Make sure you also use the standard html <img> tag since the markdown inside the div will not be parsed:

<div class="blogimage" style="float:right;width:300px;padding:10px 0 10px 10px;">
    <img src="sampleimage.png"/>
</div>
Molx
  • 6,816
  • 2
  • 31
  • 47