Skip to content

DokuWiki Links and Images — Internal, External, Interwiki, and Media Embedding

DodaTech Updated 2026-06-28 7 min read

In this tutorial, you'll learn how to create links and embed images in DokuWiki, covering internal page links, external URLs, interwiki shortcuts, email links, anchors, and image embedding with sizing and alignment.

What You'll Learn

  • Internal links to wiki pages and namespaces
  • External links to websites and URLs
  • Interwiki shortcuts (wikipedia, google, etc.)
  • Email and link with custom display text
  • Image embedding from the media manager and external sources
  • Image sizing, alignment, and linking
  • Anchor links within a page

Why It Matters

Links are the connective tissue of a wiki. Without links, each page is an isolated document. Internal links create the navigation structure that makes a wiki useful. External links connect your documentation to resources on the web. Images make pages visual and engaging. Getting the syntax right ensures links work and images display correctly.

Real-World Use

A developer documents a deployment Process. They use internal links to connect the deployment page to related pages (server setup, configuration, rollback procedures). They embed a screenshot of the deployment dashboard using the image syntax with a thumbnail size. They link to the official Docker documentation using an interwiki shortcut. The result is a well-connected, visual documentation page that serves as a single source of truth for the team.

Learning Path

flowchart LR
  A[Syntax] --> B[Links and Images]
  B --> C[Tables]
  C --> D[Media Management]
  D --> E[Sidebar]
  E --> F[Namespaces]

Internal links point to other pages within your DokuWiki.

[[page]]

This creates a link to the page with ID page. The displayed text is the page name.

[[page|Display Text]]

The pipe character separates the target from the display text. The link text can be anything you want.

[[namespace:page]]
[[projects:roadmap|Project Roadmap]]

The colon separates the namespace from the page name.

[[namespace:]]

A colon at the end links to the start page of that namespace.

[[http://example.com]]
[[http://example.com|Example Website]]

External links open in a new window by default. DokuWiki adds an external link icon automatically.

[[page|Display Text|title="Hover text"]]

The title attribute appears when the user hovers over the link.

You can link to a specific section within a page:

[[page#Section Heading]]

DokuWiki automatically generates section anchors from heading text. Spaces in the heading become underscores in the anchor.

Interwiki links are shortcuts for linking to external sites. DokuWiki comes with predefined shortcuts for Wikipedia, Google, and other sites:

[[wp>DokuWiki]]            # Links to Wikipedia article
[[google>DokuWiki]]        # Links to Google search
[[php>function.echo]]      # Links to PHP documentation

The format is [[shortcut>term]]. The shortcut is defined in conf/interwiki.conf, and you can add your own.

[[admin@example.com]]
[[admin@example.com|Email the admin]]

DokuWiki obfuscates email addresses in the HTML to prevent spam bots from harvesting them.

Embedding Images

Basic Image

{{:image.png}}

The colon before the filename indicates the root namespace. The image file must exist in data/media/.

Image from a Namespace

{{namespace:image.png}}

Image with Alternate Text

{{:image.png|Alternate text}}

The alternate text is used by screen readers and displayed if the image does not load.

Image Sizing

{{:image.png?200}}           # Width 200 pixels
{{:image.png?200x150}}       # Width 200, height 150
{{:image.png?200|Caption}}   # Width 200 with caption

The question mark introduces size parameters. If you specify only one dimension, DokuWiki maintains the aspect ratio.

Image Alignment

{{ :image.png}}              # Left aligned (space before)
{{:image.png }}              # Right aligned (space after)
{{ :image.png }}             # Center aligned (spaces both sides)

Spacing around the image syntax controls alignment.

[[http://example.com|{{:image.png}}]]

Wrap an image inside a link to make it clickable. Clicking the image navigates to the link target.

External Images

{{https://example.com/image.png}}

You can embed images from external URLs. DokuWiki fetches and caches them.

| Purpose | Syntax | |---------|--------| | Internal page | [[page]] | | With custom text | [[page|Show this]] | | External URL | [[http://example.com]] | | Interwiki | [[wp>DokuWiki]] | | Email | [[admin@example.com]] | | Image | {{:image.png}} | | Sized image | {{:image.png?200}} | | Image + link | [[url\|{{:image.png}}]] | | Right-aligned | {{:image.png }} | | Center-aligned | {{ :image.png }} |

Linking to a Non-Existent Page

When you link to a page that does not exist, DokuWiki renders it as a "broken" link (red or with a question-mark icon). Clicking it opens the page creation form. This is intentional — it encourages users to create missing pages.

By default, external links in DokuWiki have rel="nofollow" to discourage spam. You can disable this in Configuration Manager.

By default, external links open in a new window. You can change this in the template settings.

Common Mistakes

  1. Forgetting the colon for root images: {{image.png}} (without colon) links to the current namespace. {{:image.png}} (with colon) links to the root. When your page is in a namespace, these point to different files.
  2. Using backslashes instead of pipes: In Markdown, links use [text](url). In DokuWiki, they use [[url|text]]. The pipe character separates URL from text.
  3. Missing underscores or hyphens in page IDs: Links to pages with spaces in the name will not work because page IDs cannot contain spaces. Use hyphens in both the page ID and the link target.
  4. Linking to full URLs for internal pages: Use page IDs for internal links, not full URLs. [[start]] is correct; [[http://yourserver/wiki/start]] is wrong and will reload the entire page.
  5. Embedding images without checking permissions: If image uploads are restricted, the embedded image will show as a broken link. Verify the file exists and is accessible.

Practice Questions

  1. How do you link to a page in a different namespace with custom display text? Provide the exact syntax.
  2. What is the difference between {{:image.png}} and {{image.png}} when used on a page inside a namespace?
  3. How do you embed a 300-pixel-wide image that is centered and linked to an external URL?
  4. Challenge: Create a wiki page that serves as a "link hub" containing: three internal links to pages in different namespaces, two external links to documentation sites, one interwiki link to Wikipedia, one email link, one embedded image (your choice, resized to 400px wide and right-aligned), and one clickable image that links to an external site. The page should have a table of contents generated from headings.

FAQ

What happens when I link to a page that does not exist?

DokuWiki renders the link differently (typically with a dashed underline or a different color) to indicate the page has not been created. Clicking the link opens the page creation form, allowing you to create the missing page.

Can I use anchor links to jump to a specific section on another page?

Yes. Use [[page#Section Heading]] to link to a specific section. The anchor name is derived from the heading text, with spaces converted to underscores. For example, [[start#Quick Links]] jumps to the 'Quick Links' section on the start page.

How do I disable the external link icon?

The external link icon is controlled by the template's CSS. To remove it, add CSS to your conf/userstyle.css to hide the external link indicator: a.urlextern { background: none; padding: 0; }

Can I add custom interwiki shortcuts?

Yes. Edit conf/interwiki.conf and add a line like: mydoc https://docs.example.com/wiki/$1 where $1 is replaced with the term. Then use [[mydoc>topic]] in your pages.

How do I make an image thumbnail with a link to the full-size version?

Use the image syntax with sizing and wrap it in a link: [[{{:image.png?200}}|{{:image.png}}]]. This displays a 200px thumbnail that links to the full-size image.

Mini Project

Goal: Create a linked resource page with images.

  1. Create a page called resources in your wiki
  2. Add sections for "Documentation," "Tools," and "Team"
  3. Under "Documentation," add internal links to three pages in your wiki
  4. Under "Tools," add external links to three tools your team uses
  5. Under "Team," add internal links to team member pages
  6. Embed a logo or header image at the top of the page (resized to 200px)
  7. Make the header image link back to the start page
  8. Add interwiki links to Wikipedia for technical terms mentioned on the page

What's Next

Links connect your pages. Now learn to create tables and advanced formatting to present structured data.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro