Wiki: Image Directive

You are viewing the current revision of this article.
To see the canonical URL, visit: Go to Latest Version
Improved by
MaggieTheBot & others
M QINGCHARLES
Last Updated

The {{Image}} directive embeds an image from an existing file article into an article. Placed on its own line, it renders a semantic figure with optional framing, caption, and credit. Written inside a paragraph, it renders a plain inline image: Alt and Link still work, but the layout, size, frame, caption, and credit options have no visible effect.

The file article must be on the same site and in the same language as the article that uses it.

Syntax

{{Image file:slug-of-file |#| Layout=aside |#| Size=small |#| Frame=paper |#| Alt=Descriptive text |#| Caption=Caption text |#| Credit=Artist / Publication}}

				

or simply by slug:

{{Image file:slug-of-file}}

				

Parameters

Parameter Required Description
Slug (Positional) Yes The URL slug of the target file article. Accepts bare slug or file: prefix.
Layout= No Placement and width: center (default), aside (floated right in LTR), start (floated left in LTR), full, breakout, or max.
Size= No Width preset for center, aside, and start: small, medium (default for aside/start), or large. Ignored on full/breakout/max.
Frame= No Surface treatment: none (default), border (hairline edge), paper (light specimen mat), or dark (dark mat for white/light logos).
Alt= No Alternate text for screen readers and accessibility. Defaults to the file article title.
Caption= No Caption text rendered with the image. Supports inline Markdown (italics, bold, links).
CaptionPosition= No bottom (default) or top (places Caption above the image while Credit stays at the bottom).
Credit= No Attribution line rendered beneath the image in muted text. Supports inline Markdown.
Link= No file (default; links to the file article page) or none.

Layout Options

Example

{{Image file:byte-1975-circuit-board |#| Layout=breakout |#| Frame=border |#| Alt=Close-up of wire-wrapped circuit board |#| Caption=**WIRE-WRAPPED PROTOTYPE** — Prototyping board from the *Byte* construction article. |#| Credit=Byte, September 1975}}

				

Tip

If a referenced file article does not exist or has no file attached, the site renders a graceful missing-image.png placeholder.

Saving an article shows a warning for an unknown property, an unsupported value, Size combined with full, breakout, or max, or CaptionPosition=top without a Caption.


Return to the Formatting Guide.