Docs & Code Guide

Embed diagrams in Outline: image URLs, /embed, and what survives export

Outline is Markdown-native, which gives an architecture diagram two clean routes in: image syntax pointing at an external URL, and the /embed command that frames a page inside the document. Both keep the diagram tracking its source, so an edit shows up in the knowledge base within minutes. The two routes differ in reader experience and in what happens when a document is exported, and those differences decide which to use where.

6 min readFor teams running their knowledge base on Outline

See it as a diagram

Everything below, as a diagram you can edit. Describe yours and see it in seconds.

168/20003 credits left
Try:

No account needed · Editable canvas, not a picture

The image route: Markdown syntax, external URL

Outline's editor is Markdown-compatible, so standard image syntax with an absolute URL renders the image in the document, fetched from the source rather than copied into Outline's storage. That distinction is what keeps it live: Datadef serves the image with an ETag from the diagram's last edit and a five minute cache lifetime, so an edited diagram appears in the document within minutes.

This is different from pasting an image file, which Outline uploads and stores itself. Uploaded copies are frozen; URL references follow their source. For a diagram meant to stay current, always reference, never upload.

![Platform architecture](https://datadef.io/api/embed/my-platform-a1b2c3d4)

<!-- Sized render if the default 1600x1000 at 2x does not fit -->
![Platform architecture](https://datadef.io/api/embed/my-platform-a1b2c3d4?width=2000&height=1250&scale=2)

The /embed command and the integration list

Outline builds rich interactive embeds automatically when you paste a link from a recognized service: Figma, Google Docs, Loom, and a long list of others unfurl into purpose-built frames. For services not on that list, the /embed command is the general mechanism: it places a link into an embedded frame where the document shows the external page, provided the target permits being framed.

Datadef's embed page allows framing, so /embed with the interactive URL gives readers a pannable, zoomable diagram inside the Outline document, chrome-less except for a small attribution link to the full version. Sites that send X-Frame-Options or a restrictive frame-ancestors policy are the ones that leave an empty frame here.

In an Outline document:
1. Type /embed and press enter
2. Paste: https://datadef.io/embed/my-platform-a1b2c3d4
3. The diagram renders in-place; readers pan and zoom without leaving the doc

Export fidelity: which form survives leaving Outline

Outline exports documents as Markdown, and the two embed forms fare differently. Images that were uploaded into Outline export with instance-relative upload paths, which break the moment the Markdown lives anywhere else. An image referenced by absolute external URL exports as exactly that URL and keeps rendering wherever the Markdown lands: another wiki, a repo, an editor preview.

That makes the external image reference the most portable form of the diagram: live inside Outline, and still live after an export or migration. Embed blocks are an in-app experience and do not carry the same weight in exported Markdown, so documents that must survive export should carry the diagram as an image reference, possibly alongside an embed for in-app readers.

Keeping the diagram current

The document now tracks the diagram; the diagram has to track the system, and that is a repo-side loop. Datadef publishes an MCP server under the registry name io.datadef/mcp, and a connected coding agent, Claude Code and Cursor both qualify, can regenerate the diagram from what it finds in the repository after a merge. Nothing is detected for you: Datadef does not watch repos, so regeneration fires when the agent is invoked, from CI or by hand, carrying an API key issued on paid plans.

Architecture pages in a knowledge base are read most by the people who joined last. Keeping those pages true is most of the value, and the wider practice is covered in keeping onboarding docs up to date.

Where the pattern stops

Both embed forms exist only for projects shared public; a private project turns the image URL into a 404 and removes the embed page with it. For confidential architectures, upload a static export into Outline and accept the staleness, or keep the diagram out of the knowledge base.

Outline deserves its credit here: pasting links that become rich embeds is one of its best behaviors, and it embeds Figma or Google Docs artifacts as well as it embeds a diagram. What no wiki does is keep the diagram itself true; that loop always lives with whoever, or whatever, edits the source. The repo-side baseline is covered in embed diagrams in Markdown.

FAQ

How do I embed a diagram in Outline?

Two ways: Markdown image syntax with the absolute image URL, such as https://datadef.io/api/embed/your-slug, or the /embed command with an interactive page URL for a frame readers can pan and zoom. The image form is lighter and survives Markdown export; the embed form is the better in-app reading experience.

Does Outline embed arbitrary URLs or only supported integrations?

Recognized services unfurl into purpose-built rich embeds automatically when you paste their links. Other URLs go through the generic /embed command, which frames the page if the target site permits being framed. Sites sending X-Frame-Options or restrictive frame-ancestors headers show an empty frame.

Do external images in Outline update when the source changes?

Yes. An image referenced by URL is fetched from its source at view time, not copied into Outline storage. Datadef serves diagram images with a five minute cache lifetime, so an edit appears in documents within minutes. Uploaded image files, by contrast, are frozen copies.

What happens to embedded diagrams when I export Outline documents as Markdown?

Images referenced by absolute external URL export as-is and keep working anywhere the Markdown goes. Images that were uploaded into Outline export with instance-relative paths that break outside the instance. Embed blocks are an in-app experience and do not export as working frames.

Can I embed a private diagram in Outline?

A live embed requires a public project, so a confidential diagram enters Outline as an uploaded file instead. Be aware of what that costs beyond freshness: uploads leave Outline on export with instance-relative paths that break outside the instance, so a migrated document loses the picture. The URL reference has the opposite profile, portable but public-only.