swiftimg

← Blog · · 4 min read

How to host images in a GitHub README (and keep them fast)

You can commit images into your repo, but that bloats every clone and ties your images to your git history. Hosting them externally and linking keeps the repo lean and lets you swap an image without a commit — as long as you host somewhere fast that allows hotlinking.

The quickest path

  1. Upload the image (free, no account) at swiftimg.com/upload.
  2. Copy the direct link from the share box.
  3. Drop it into your README with Markdown:
README.md
![Build status dashboard](https://i.swiftimg.com/variants/9fK2/display.webp)

Want it clickable (e.g. to open the full-size image or your site)? Use HTML, which GitHub Markdown supports:

README.md (HTML)
<a href="https://swiftimg.com/i/9fK2">
  <img src="https://i.swiftimg.com/variants/9fK2/display.webp"
       alt="Build status dashboard" width="600" />
</a>

Why not hotlink from anywhere?

Doing this across a lot of repos? The swiftimg CLI lets you swiftimg upload diagram.png and paste the link without leaving your terminal.

Host your images globally

Free to start — no account needed. Upgrade for the API, transforms, and a custom domain.