Markdown: How to resize image defined with a base64 data uri

Viewed 183

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?

1 Answers

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=="/>

Related