Skip to content

Support thumb-style framed image embeds with visible captions#12

Merged
JeroenDeDauw merged 2 commits into
masterfrom
image-thumb-captions
Jul 5, 2026
Merged

Support thumb-style framed image embeds with visible captions#12
JeroenDeDauw merged 2 commits into
masterfrom
image-thumb-captions

Conversation

@JeroenDeDauw

@JeroenDeDauw JeroenDeDauw commented Jul 5, 2026

Copy link
Copy Markdown
Member

Fixes #2

Adds an opt-in thumb keyword rendering a file embed as MediaWiki's framed thumbnail with the caption below the image, keeping inline rendering the default and leaving frame, frameless and alignment for later.

Known limitations (deferred, non-blocking):

  • A standalone [[File:X|thumb|Caption]] on its own line renders as <p><figure>...</figure></p>; browsers auto-close the paragraph so it displays correctly, but the nesting is invalid HTML. Promoting block-level embeds out of the paragraph is left for a follow-up.
  • A missing file combined with thumb renders the upload link and drops the caption; non-inline media (audio, PDF) with thumb renders as a plain file-page link.
  • The mediawiki.page.media module is not loaded, so the client-side magnify affordance is absent; the server-rendered frame and caption are unaffected.

Authored by Claude Code (Opus 4.8 (max)) at Jeroen De Dauw's direction. Jeroen sets direction and reviews.

Fixes #2

Adds an opt-in `thumb` keyword rendering a file embed as MediaWiki's framed thumbnail with the caption below the image, keeping inline rendering the default and leaving frame, frameless and alignment for later.
@JeroenDeDauw JeroenDeDauw marked this pull request as ready for review July 5, 2026 23:27
@JeroenDeDauw JeroenDeDauw merged commit bf422da into master Jul 5, 2026
12 checks passed
@JeroenDeDauw JeroenDeDauw deleted the image-thumb-captions branch July 5, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support visible image captions (thumb-style framed embeds)

1 participant