Custom image width in Markdown / html.05 May 2021
Today, I wanted to change the width on an image, in a webpage, that was written in Github-flavored Markdown. Like, groan. I had read this page at some previous date, where you can fiddle with the css to get some features to change, and I did those things, again. It didn’t work.
So I just wrote it in html, as suggested by this highly ranked SO answer.
<img src="drawing.jpg" alt="alt text" style="width:150px;"/>
Along the way, I discovered some other handy things, like you can set up an image to be aligned on a certain side, add padding, and then wrap text.
<img src="drawing.jpg" alt="alt text" align = "left" style="width:100px; padding: 0px 10px 10px 0px"/> Here's some text that is going wrap ...
Here’s some text that is going wrap. I am using the montage example from the TIL example from three days ago. Though really as I write this, and after going through a lot of angst with getting image sizes right, I realized I could have just resized the images and used the resized images instead of a width attribute. I think that’s what I may do in the future.