# Embeds

Embed external media with a single line. Write `embed:` followed by a URL — sitemd detects the provider and renders a responsive embed automatically.

No iframes, no HTML, no configuration. Just the URL.

```markdown
embed: https://media1.tenor.com/m/Nkw4aIUJWcEAAAAC/brent-rambo-thumbs-up.gif
```

embed: https://media1.tenor.com/m/Nkw4aIUJWcEAAAAC/brent-rambo-thumbs-up.gif

## Supported providers

sitemd auto-detects these providers from the URL:

| Provider | Example URL |
|---|---|
| [YouTube](#youtube) | `youtube.com/watch?v=ID` or `youtu.be/ID` |
| [Vimeo](#vimeo) | `vimeo.com/123456` |
| [X / Twitter](#twitter) | `x.com/user/status/123` or `twitter.com/user/status/123` |
| [Reddit](#reddit) | `reddit.com/r/sub/comments/ID/title` |
| [Instagram](#instagram) | `instagram.com/p/ID` or `instagram.com/reel/ID` |
| [LinkedIn](#linkedin) | `linkedin.com/posts/user-activity-ID` or `linkedin.com/embed/feed/update/urn:li:share:ID` |
| [TikTok](#tiktok) | `tiktok.com/@user/video/ID` |
| [Spotify](#spotify) | `open.spotify.com/track/ID`, `album/ID`, `playlist/ID`, `episode/ID` |
| [CodePen](#codepen) | `codepen.io/user/pen/ID` |
| [Images](#images) | Any URL ending in `.png`, `.jpg`, `.gif`, `.webp`, `.avif`, or `.svg` |

Any URL not matching a known provider or image extension renders as a generic iframe. For image resizing, cropping, filters, and galleries, see [Images](/docs/images).

## Usage

Write `embed:` on its own line followed by the full URL:

```markdown
Some text above the video.

embed: https://www.youtube.com/watch?v=dQw4w9WgXcQ

More text below.
```

Each embed stands alone — unlike buttons, consecutive embeds are not grouped together.

## Examples by provider

{#youtube}
**YouTube**

```markdown
embed: https://www.youtube.com/watch?v=dQw4w9WgXcQ
```
embed: https://youtu.be/dQw4w9WgXcQ

{#spotify}
**Spotify**

```markdown
embed: https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT
embed: https://open.spotify.com/album/1DFixLWuPkv3KT3TnV35m3
embed: https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M
```
embed: https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT

{#vimeo}
**Vimeo**

```markdown
embed: https://vimeo.com/76979871
```
embed: https://vimeo.com/76979871

{#twitter}
**X / Twitter**

```markdown
embed: https://x.com/elonmusk/status/1585341984679469056
```
embed: https://x.com/elonmusk/status/1585341984679469056

{#reddit}
**Reddit**

```markdown
embed: https://www.reddit.com/r/vibecoding/comments/1qqxshz/has_anyone_vibecoded_something_to_finish_that/
```
embed: https://www.reddit.com/r/vibecoding/comments/1qqxshz/has_anyone_vibecoded_something_to_finish_that/

{#instagram}
**Instagram**

```markdown
embed: https://www.instagram.com/p/C0xFHGOrBN7/
```
embed: https://www.instagram.com/p/C0xFHGOrBN7/

{#linkedin}
**LinkedIn**

```markdown
embed: https://www.linkedin.com/embed/feed/update/urn:li:share:6898694772484112384
```
embed: https://www.linkedin.com/embed/feed/update/urn:li:share:6898694772484112384

{#tiktok}
**TikTok**

```markdown
embed: https://www.tiktok.com/@bellapoarch/video/6862153058223197445
```
embed: https://www.tiktok.com/@bellapoarch/video/6862153058223197445

{#codepen}
**CodePen**

```markdown
embed: https://codepen.io/thebabydino/pen/mOJvyB
```
embed: https://codepen.io/thebabydino/pen/mOJvyB

{#images}
**Images**

```markdown
embed: https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/BrownSpiderMonkey_%28edit2%29.jpg/500px-BrownSpiderMonkey_%28edit2%29.jpg
embed: /theme/images/hero.webp
```
embed: https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/BrownSpiderMonkey_%28edit2%29.jpg/500px-BrownSpiderMonkey_%28edit2%29.jpg

For image resizing, cropping, filters, and galleries, see [Images](/docs/images).

**Any other URL**

```markdown
embed: https://randompicturegenerator.com
```
embed: https://randompicturegenerator.com

Falls back to a generic responsive iframe.

## Notes

- Embeds inside fenced code blocks are displayed as text, not rendered.
- Each embed is wrapped in a responsive container that adapts to the content type — 16:9 for video, compact player for Spotify, taller frame for CodePen.
- For full control over iframe attributes, use [inline HTML](/docs/inline-html) instead.