3

In markdown, I would like to embed a base64 image data uri.

![description](data:image/png;base64, --base64 png--)

Is there any way to resize the rendered image in markdown?

gaitat
  • 12,449
  • 4
  • 52
  • 76

1 Answers1

0

As per this answer, it is allowed and encouraged to use HTML within markdown. So you can embed and resize a base64 image using the img tag in HTML by adding the data uri in the src attribute as follows.

<img width="20" height="15" src="data:image/jpeg;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="/>
jayadeepk
  • 21
  • 1
  • 7
  • I am aware of this method. Wanted a markdown only solution. – gaitat May 27 '22 at 15:20
  • @gaitat John Gruber, the co-creator of markdown, mentioned in his website that "As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML tags." https://daringfireball.net/projects/markdown/syntax#img – jayadeepk May 29 '22 at 03:43