swiftimg

← Blog · · 4 min read

How to embed an image anywhere: HTML, Markdown, BBCode & forums

“Embedding” an image just means showing it inline somewhere using a link to where the file lives, instead of re-uploading it. The trick is using the right snippet for the place you're pasting into — and hosting the file somewhere fast that allows hotlinking. Here's every common format.

1. On a web page (HTML)

The <img> tag is all you need. Always include alt text for accessibility and SEO, and loading="lazy" so off-screen images don't block the page.

HTML
<img src="https://i.swiftimg.com/variants/9fK2/display.webp"
     alt="Sunset over the bay" loading="lazy" />

To make the image clickable (e.g. to open the full-size version), wrap it in a link:

HTML — linked
<a href="https://swiftimg.com/i/9fK2">
  <img src="https://i.swiftimg.com/variants/9fK2/display.webp" alt="Sunset" />
</a>

2. In Markdown (READMEs, GitHub, docs, Reddit)

Markdown's image syntax is an exclamation mark, the alt text in square brackets, then the URL in parentheses:

Markdown
![Sunset over the bay](https://i.swiftimg.com/variants/9fK2/display.webp)

3. On a forum (BBCode)

Many forums use BBCode. Use [img] tags, and link back to the source page with [url] so people can find the original:

BBCode
[url=https://swiftimg.com/i/9fK2][img]https://i.swiftimg.com/variants/9fK2/display.webp[/img][/url]

4. In chat (Discord, Slack)

Chat apps unfurl a direct image link automatically — just paste the direct URL and the app renders a preview. No special syntax required.

Tips for embeds that don't break

With swiftimg, every upload gives you all of these snippets ready to copy — open any image and use the Share & embed box.

Host your images globally

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