Skip to content

Wikitext image keywords other than thumb are unsupported and leak into the caption #45

Description

@JeroenDeDauw

[[File:X|...]] embeds support a minimal wikitext parameter subset: a width, alt=, a caption, and thumb. The
remaining framing and layout keywords are unimplemented:

  • frame — original size in a frame with a caption
  • frameless — downscaled, no frame
  • border — a border around the image
  • alignment: left, right, center, none

Deferred from #2 and tracked in #15, which is now closed: its named follow-ups shipped in 1.2.0, and its remaining
sub-item turned out to already match wikitext. Filing this so the gap stays visible.

There is a visible symptom beyond the missing feature. FileEmbed::fromTitleAndParams() treats the last
unrecognised parameter as the caption, so an alignment keyword becomes caption text rather than being ignored:

  • [[File:Cat.png|thumb|left]] renders a thumbnail captioned left, where wikitext renders a left-aligned
    thumbnail with no caption.
  • [[File:Cat.png|thumb|right|Real caption]] happens to render correctly, because the real caption overwrites
    right. Parameter order hides the problem.

Low priority: nothing breaks, and it only bites when a keyword is the final parameter. Worth doing because file
embeds deliberately use wikitext syntax, so readers coming from wikitext will reasonably expect these keywords to
work — and where they are not implemented, they should at least be recognised and dropped rather than displayed.

AI-authored — Claude Code, Opus 4.8 (max); filed while @JeroenDeDauw asked whether #15's remaining sub-item was worth doing ahead of the 1.2.0 release; not yet human-reviewed; behaviour traced through FileEmbed::fromTitleAndParams() and core's Linker::makeImageLink(), not reproduced in a browser.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions