Basic syntax
. The alt text is read by screen readers and shown if the image fails to load, so describe what the image shows.
Resize an image
Markdown has no width syntax. Use HTML: <img src="shot.png" width="400" alt="…">. GitHub keeps width and height attributes. Some editors (Obsidian, Pandoc) have their own size syntax that won’t work elsewhere.
Center an image
Wrap it in a centred block: <p align="center"><img src="logo.png" width="120"></p>. The align attribute is obsolete in HTML5 but still honoured by GitHub, which strips style.
Image as a link
Put the image inside the link text: [](https://example.com). Badges in READMEs use exactly this.
Captions
Markdown has no caption element. Use an italic line under the image, or HTML <figure> and <figcaption> where allowed.
Local images
In a repo, use a relative path: . In the editor here, local files would need to be hosted somewhere public to show up once exported.