← Back to Blog

How to Embed Images in HTML, Markdown, and BBCode

May 28, 2026

Once your image is hosted online and you have a direct link, the next step is embedding it where you want it to appear. Different platforms use different markup languages, and using the wrong one means your image shows up as a raw URL instead of an actual picture. Here is the exact syntax for the three most common formats.

What you need first: a direct image link

Every embed method below needs a direct image link — a URL that ends in an image extension like .jpg, .png, .gif, or .webp. A direct link points straight at the image file itself, not at a web page that displays the image. If your link does not end in a file extension, it usually will not embed correctly.

When you upload to IMGBS, every image gets a clean direct link, and the ready-to-paste HTML, Markdown, and BBCode codes are generated automatically on the image page. But it is still worth understanding how each one works.

HTML

HTML is used on websites, blogs, and anywhere you control the raw page code. The image tag looks like this:

<img src="https://imgbs.com/uploads/your-image.jpg" alt="A description of the image">

The src attribute is the direct link to your image. The alt attribute is a text description that shows if the image fails to load, and is read aloud by screen readers — it is important for accessibility and helps with SEO. Always include meaningful alt text.

You can also control the size with width and height attributes:

<img src="https://imgbs.com/uploads/your-image.jpg" alt="Description" width="600">

Markdown

Markdown is used on Reddit, GitHub, Discord (in some contexts), Stack Overflow, and many note-taking apps and static blogs. The image syntax is an exclamation mark, square brackets with the alt text, and parentheses with the link:

![A description of the image](https://imgbs.com/uploads/your-image.jpg)

The key thing people forget is the leading exclamation mark. Without it, you get a clickable text link instead of an embedded image. With it, the image displays inline.

BBCode

BBCode is the markup used by traditional forum software like phpBB, vBulletin, XenForo, and Simple Machines. It uses square-bracket tags. To embed an image:

[img]https://imgbs.com/uploads/your-image.jpg[/img]

Some forums also let you make the image a clickable link to a larger version by combining the url and img tags:

[url=https://imgbs.com/i/12345][img]https://imgbs.com/uploads/your-image.jpg[/img][/url]

Quick reference

FormatUsed onSyntax
HTMLWebsites, blogs<img src="...">
MarkdownReddit, GitHub![alt](...)
BBCodeForums[img]...[/img]

Skip the memorizing

You do not have to memorize any of this. When you upload an image to IMGBS, the image page gives you every format ready to copy with one click — direct link, HTML, Markdown, and BBCode. Pick the one your platform needs, paste it, and you are done.