Help:Contributing/richMediaContent: Difference between revisions
Live-render examples with File:Example.png + concrete Files-and-entities (P32 image property, Q162) (via update-page on MediaWiki MCP Server) |
docs: add the GeoGebra worksheet embed section (File:x.ggb, deployed 2026-09-23) (via update-page on MediaWiki MCP Server) |
||
| (10 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Files on this wiki are classic wiki pages in the <syntaxhighlight lang="text" inline>File:</syntaxhighlight> namespace | Files on this wiki are classic wiki pages in the <syntaxhighlight lang="text" inline>File:</syntaxhighlight> namespace. | ||
You must upload a file before including it in a page. | |||
== Uploading a file == | == Uploading a file == | ||
You must be logged in — anonymous visitors | You must be logged in — anonymous visitors can only read content. Open [[Special:Upload]], or use the "Upload file" link in the toolbox on the left. | ||
The form asks for three things: | The form asks for three things: | ||
* '''Source file''' — the file on your computer. This wiki accepts <syntaxhighlight lang="text" inline>png</syntaxhighlight>, <syntaxhighlight lang="text" inline>gif</syntaxhighlight>, <syntaxhighlight lang="text" inline>jpg</syntaxhighlight>, <syntaxhighlight lang="text" inline>jpeg</syntaxhighlight> and <syntaxhighlight lang="text" inline>webp</syntaxhighlight>. | * '''Source file''' — the file on your computer. This wiki accepts <syntaxhighlight lang="text" inline>png</syntaxhighlight>, <syntaxhighlight lang="text" inline>gif</syntaxhighlight>, <syntaxhighlight lang="text" inline>jpg</syntaxhighlight>, <syntaxhighlight lang="text" inline>jpeg</syntaxhighlight> and <syntaxhighlight lang="text" inline>webp</syntaxhighlight> for images, and <syntaxhighlight lang="text" inline>ogg</syntaxhighlight>, <syntaxhighlight lang="text" inline>ogv</syntaxhighlight>, <syntaxhighlight lang="text" inline>oga</syntaxhighlight> and <syntaxhighlight lang="text" inline>webm</syntaxhighlight> for audio and video. | ||
* '''Destination filename''' — the name the file will have here, for example <syntaxhighlight lang="text" inline>Example.png</syntaxhighlight>. Choose a descriptive, unique name. | * '''Destination filename''' — the name the file will have here, for example <syntaxhighlight lang="text" inline>Example.png</syntaxhighlight>. Choose a descriptive, unique name. | ||
* '''Summary''' — what the file shows and where it comes from. | * '''Summary''' — the file description: what the file contains or shows, and where it comes from. This text is what visitors see in [[Special:ListFiles]], so describe the file itself — not where it is used or how it was processed. | ||
{| class="wikitable" | |||
|- | |||
! Avoid — where the file is used or what was done to it !! Write this — what the file shows | |||
|- | |||
| "Sample video for Help:Contributing/richMediaContent" || NASA Apollo 11 television footage of Buzz Aldrin descending the lunar module ladder. Public domain (NASA). | |||
|- | |||
| "Resized to 600 × 600 to fit the help page" || Photograph of Earth, the "Blue Marble", taken by the Apollo 17 crew. Public domain (NASA). | |||
|} | |||
The summary cannot be edited in place. To correct it, upload a new version of the file (it may be the same file) with the corrected summary. The text on the file page — what visitors see under the media — is separate and can be edited like any page; keep it consistent with the summary. | |||
The size limit is 1 GiB. The form warns for files larger than 50 MB — the warning does not block the upload. | The size limit is 1 GiB. The form warns for files larger than 50 MB — the warning does not block the upload. | ||
After uploading, the file lives at a page called <syntaxhighlight lang="text" inline>File:Name.ext</syntaxhighlight>. The page shows the | After uploading, the file lives at a page called <syntaxhighlight lang="text" inline>File:Name.ext</syntaxhighlight>. The page shows the media and its description. To replace a file, use "Upload a new version of this file" on the file page — the history keeps every version. | ||
Files larger than roughly 100 MB are slow to upload in one request. Use chunked uploads through the API instead: see the official [https://www.mediawiki.org/wiki/API:Upload API:Upload] documentation. | Files larger than roughly 100 MB are slow to upload in one request. Use chunked uploads through the API instead: see the MediaWiki official [https://www.mediawiki.org/wiki/API:Upload API:Upload] documentation. | ||
== Embedding | == Embedding an image == | ||
The examples below use [[:File:Example.png|Example.png]], a public-domain NASA photograph of Earth. The '''You get''' column shows each example rendered live. Replace <syntaxhighlight lang="text" inline>Example.png</syntaxhighlight> with your file's name. | The examples below use [[:File:Example.png|Example.png]], a public-domain NASA photograph of Earth. The '''You get''' column shows each example rendered live. Replace <syntaxhighlight lang="text" inline>Example.png</syntaxhighlight> with your file's name. | ||
| Line 61: | Line 74: | ||
Add categories at the bottom of the file page, just like on any page. | Add categories at the bottom of the file page, just like on any page. | ||
== Embedding audio == | |||
The examples below use [[:File:Example.ogg|Example.ogg]], a public-domain NASA recording of Apollo 11 launch-day communications. Audio plays in the browser; transcoding for compatibility happens automatically in the background. | |||
{| class="wikitable" style="width:100%" | |||
|- | |||
! You type !! What it does !! You get | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Example.ogg]]</syntaxhighlight> | |||
| An inline audio player, with play/pause and a progress bar. | |||
| [[File:Example.ogg]] | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Example.ogg|thumb|Caption text]]</syntaxhighlight> | |||
| The player inside a framed box with a caption. | |||
| [[File:Example.ogg|thumb|Caption text]] | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[Media:Example.ogg]]</syntaxhighlight> | |||
| A text link to the file itself; the reader downloads it instead of playing it inline. | |||
| [[Media:Example.ogg]] | |||
|} | |||
Accepted audio formats are <syntaxhighlight lang="text" inline>ogg</syntaxhighlight> and <syntaxhighlight lang="text" inline>oga</syntaxhighlight> (Vorbis or Opus). | |||
== Embedding video == | |||
The examples below use [[:File:Example.ogv|Example.ogv]], a public-domain NASA television clip of Buzz Aldrin descending the lunar module ladder. Video plays in the browser; transcoding for compatibility happens automatically in the background. | |||
{| class="wikitable" style="width:100%" | |||
|- | |||
! You type !! What it does !! You get | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Example.ogv]]</syntaxhighlight> | |||
| An inline video player at the file's native size. | |||
| [[File:Example.ogv]] | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Example.ogv|thumb|Caption text]]</syntaxhighlight> | |||
| A thumbnail-sized player floating right, with a caption. | |||
| [[File:Example.ogv|thumb|Caption text]] | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Example.ogv|300px]]</syntaxhighlight> | |||
| Fixes the width to 300 pixels; the height keeps the proportions. | |||
| [[File:Example.ogv|300px]] | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Example.ogv|start=0:05|end=0:15]]</syntaxhighlight> | |||
| Plays only the given time range, written as minutes:seconds. | |||
| [[File:Example.ogv|start=0:05|end=0:15]] | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[Media:Example.ogv]]</syntaxhighlight> | |||
| A text link to the file itself; the reader downloads it instead of playing it inline. | |||
| [[Media:Example.ogv]] | |||
|} | |||
Accepted video formats are <syntaxhighlight lang="text" inline>ogv</syntaxhighlight> and <syntaxhighlight lang="text" inline>webm</syntaxhighlight> (Theora, VP8 or VP9). | |||
== Files and entities == | == Files and entities == | ||
| Line 66: | Line 133: | ||
A file is not an entity and has no Q number: it cannot carry statements itself. To attach a file to an item, add a statement on the item with the [[Property:P32|image property (P32)]], whose datatype is Url, and put the file page URL as the value. | A file is not an entity and has no Q number: it cannot carry statements itself. To attach a file to an item, add a statement on the item with the [[Property:P32|image property (P32)]], whose datatype is Url, and put the file page URL as the value. | ||
Example — the item [[Q162|Blue Marble (photograph)]] carries the statement: | Example — the item [[Item:Q162|Blue Marble (photograph)]] carries the statement: | ||
* <syntaxhighlight lang="text" inline>image</syntaxhighlight> → <syntaxhighlight lang="text" inline>https://wikibase.ronzz.org/wiki/File:Example.png</syntaxhighlight> | * <syntaxhighlight lang="text" inline>image</syntaxhighlight> → <syntaxhighlight lang="text" inline>https://wikibase.ronzz.org/wiki/File:Example.png</syntaxhighlight> | ||
| Line 76: | Line 143: | ||
== See also == | == See also == | ||
* [https://www.mediawiki.org/wiki/Help:Images Help:Images] (official) — the complete image syntax reference | * [https://www.mediawiki.org/wiki/Help:Images Help:Images] (MediaWiki official) — the complete image syntax reference | ||
* [https://www.mediawiki.org/wiki/Help:Linking_to_files Help:Linking to files] (official) — linking and download behavior | * [https://www.mediawiki.org/wiki/Help:Linking_to_files Help:Linking to files] (MediaWiki official) — linking and download behavior | ||
* [https://www.mediawiki.org/wiki/API:Upload API:Upload] (official) — uploads, including chunked uploads | * [https://www.mediawiki.org/wiki/Help:Extension:TimedMediaHandler Help:Extension:TimedMediaHandler] (MediaWiki official) — audio and video embedding reference | ||
* [https://www.mediawiki.org/wiki/API:Upload API:Upload] (MediaWiki official) — uploads, including chunked uploads | |||
* [[Help:Contributing]] — the contributor hub | * [[Help:Contributing]] — the contributor hub | ||
=== Uploading from a URL === | |||
You can also upload a file by pasting a URL instead of choosing one — use the '''Source file''' section's URL option. It works for images, PDFs, audio and video. A '''Validate''' button reads the file's metadata (for Wikimedia URLs, straight from the source in your browser): | |||
* The '''Destination filename''' is filled automatically, normalized to lowercase with any word separator — spaces, underscores, or capitalization changes — replaced by dashes (for example <syntaxhighlight lang="text" inline>National Geographic Society Administration Building</syntaxhighlight> or <syntaxhighlight lang="text" inline>National_Geographic_Society_Administration_Building</syntaxhighlight> becomes <syntaxhighlight lang="text" inline>national-geographic-society-administration-building</syntaxhighlight>). You can change it before uploading; the file extension is added automatically. | |||
* The '''Summary''' is filled with the file's description from the source, up to 2000 characters, cut at a sentence boundary when longer. | |||
* '''Author''' and the '''license''' are pre-filled when the source provides them — check them, since attribution accuracy is your responsibility. For non-image files (PDF, audio, video) the validate step reports the file type and size instead of a preview. | |||
For large Wikimedia files the upload itself also happens through your browser, so the wiki server never downloads the file from Wikimedia. | |||
* The '''license''' field is pre-filled when the source names one, and the wiki checks it against the instance's license items. When it finds a match it shows a confirmation line — "License fetched from source: {value}, we think this corresponds to {label} (Q#)." — with '''Yes, that's right''' / '''No, let me correct'''. Say No to clear the field and pick the license yourself. Attribution accuracy stays your responsibility. | |||
== Embedding a GeoGebra worksheet == | |||
A GeoGebra worksheet is saved as a <syntaxhighlight lang="text" inline>.ggb</syntaxhighlight> file. It uploads and versions exactly like any other file ([[Special:Upload]], "Upload a new version of this file") — the accepted-format list includes <syntaxhighlight lang="text" inline>ggb</syntaxhighlight>. Unlike an image, it embeds as an '''interactive''' applet that readers can pan, zoom and manipulate in the page. | |||
{| class="wikitable" style="width:100%" | |||
|- | |||
! You type !! What it does | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Parabola.ggb]]</syntaxhighlight> | |||
| The interactive worksheet at the default size (800 × 600). | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Parabola.ggb|600px]]</syntaxhighlight> | |||
| Fixes the width to 600 pixels; the height keeps the 4:3 proportions. | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[File:Parabola.ggb|thumb|Caption text]]</syntaxhighlight> | |||
| A framed applet with a caption. | |||
|- | |||
| <syntaxhighlight lang="text" inline>[[:File:Parabola.ggb]]</syntaxhighlight> | |||
| A text link to the file page — the leading colon prevents embedding. | |||
|} | |||
Replace <syntaxhighlight lang="text" inline>Parabola.ggb</syntaxhighlight> with your worksheet's name. The same options as images apply (width, <syntaxhighlight lang="text" inline>thumb</syntaxhighlight>, caption, alignment). Upload a worksheet to a page to see it render. | |||
The applet loads from a separate, cookie-less origin (<syntaxhighlight lang="text" inline>ggb.ronzz.org</syntaxhighlight>) inside a sandboxed frame, so a worksheet cannot read this wiki's pages or your session. For the same reason, GeoGebra is configured to '''not run JavaScript stored inside the worksheet''' — worksheets that rely on embedded JavaScript may not behave exactly as they do in the GeoGebra desktop app. | |||
Latest revision as of 17:53, 23 September 2026
Files on this wiki are classic wiki pages in the File: namespace.
You must upload a file before including it in a page.
Uploading a file
You must be logged in — anonymous visitors can only read content. Open Special:Upload, or use the "Upload file" link in the toolbox on the left.
The form asks for three things:
- Source file — the file on your computer. This wiki accepts
png,gif,jpg,jpegandwebpfor images, andogg,ogv,ogaandwebmfor audio and video. - Destination filename — the name the file will have here, for example
Example.png. Choose a descriptive, unique name. - Summary — the file description: what the file contains or shows, and where it comes from. This text is what visitors see in Special:ListFiles, so describe the file itself — not where it is used or how it was processed.
| Avoid — where the file is used or what was done to it | Write this — what the file shows |
|---|---|
| "Sample video for Help:Contributing/richMediaContent" | NASA Apollo 11 television footage of Buzz Aldrin descending the lunar module ladder. Public domain (NASA). |
| "Resized to 600 × 600 to fit the help page" | Photograph of Earth, the "Blue Marble", taken by the Apollo 17 crew. Public domain (NASA). |
The summary cannot be edited in place. To correct it, upload a new version of the file (it may be the same file) with the corrected summary. The text on the file page — what visitors see under the media — is separate and can be edited like any page; keep it consistent with the summary.
The size limit is 1 GiB. The form warns for files larger than 50 MB — the warning does not block the upload.
After uploading, the file lives at a page called File:Name.ext. The page shows the media and its description. To replace a file, use "Upload a new version of this file" on the file page — the history keeps every version.
Files larger than roughly 100 MB are slow to upload in one request. Use chunked uploads through the API instead: see the MediaWiki official API:Upload documentation.
Embedding an image
The examples below use Example.png, a public-domain NASA photograph of Earth. The You get column shows each example rendered live. Replace Example.png with your file's name.
| You type | What it does | You get |
|---|---|---|
[[File:Example.png]]
|
Renders the image at full size, inline. |
|
[[File:Example.png|thumb|Caption text]]
|
A thumbnail floating right, with a caption. The most common choice on content pages. | |
[[File:Example.png|300px]]
|
Fixes the width to 300 pixels; the height keeps the proportions. | |
[[File:Example.png|thumb|left|Caption text]]
|
Thumbnail floating left. Use left, right, center or none.
|
|
[[File:Example.png|alt=The Earth seen from Apollo 17]]
|
Sets the alt text, read by screen readers and shown when the image cannot load. The visible render is unchanged. |
|
[[File:Example.png|link=Main Page]]
|
Clicking the image opens Main Page instead of the file page. The render looks the same. |
|
[[:File:Example.png]]
|
A text link to the file page — the leading colon prevents embedding. | File:Example.png |
[[Media:Example.png]]
|
A direct link to the file itself; the reader downloads it instead of seeing it embedded. | Media:Example.png |
Options are separated by pipes, in any order. Any parameter that is not an option becomes the caption. A red link means the file does not exist — check the spelling or upload the file first.
Add categories at the bottom of the file page, just like on any page.
Embedding audio
The examples below use Example.ogg, a public-domain NASA recording of Apollo 11 launch-day communications. Audio plays in the browser; transcoding for compatibility happens automatically in the background.
| You type | What it does | You get |
|---|---|---|
[[File:Example.ogg]]
|
An inline audio player, with play/pause and a progress bar. | |
[[File:Example.ogg|thumb|Caption text]]
|
The player inside a framed box with a caption. | |
[[Media:Example.ogg]]
|
A text link to the file itself; the reader downloads it instead of playing it inline. | Media:Example.ogg |
Accepted audio formats are ogg and oga (Vorbis or Opus).
Embedding video
The examples below use Example.ogv, a public-domain NASA television clip of Buzz Aldrin descending the lunar module ladder. Video plays in the browser; transcoding for compatibility happens automatically in the background.
| You type | What it does | You get |
|---|---|---|
[[File:Example.ogv]]
|
An inline video player at the file's native size. | |
[[File:Example.ogv|thumb|Caption text]]
|
A thumbnail-sized player floating right, with a caption. | |
[[File:Example.ogv|300px]]
|
Fixes the width to 300 pixels; the height keeps the proportions. | |
[[File:Example.ogv|start=0:05|end=0:15]]
|
Plays only the given time range, written as minutes:seconds. | |
[[Media:Example.ogv]]
|
A text link to the file itself; the reader downloads it instead of playing it inline. | Media:Example.ogv |
Accepted video formats are ogv and webm (Theora, VP8 or VP9).
Files and entities
A file is not an entity and has no Q number: it cannot carry statements itself. To attach a file to an item, add a statement on the item with the image property (P32), whose datatype is Url, and put the file page URL as the value.
Example — the item Blue Marble (photograph) carries the statement:
image→https://wikibase.ronzz.org/wiki/File:Example.png
Open Special:EntityPage/Q162 to see it live: the statement links to the file page, and the file page renders the image. Because the value is a plain URL, the same property works for any file you can link to — an upload on this wiki, a picture hosted elsewhere, or a file on Wikimedia Commons.
The statement workflow is the usual one: Items and properties.
See also
- Help:Images (MediaWiki official) — the complete image syntax reference
- Help:Linking to files (MediaWiki official) — linking and download behavior
- Help:Extension:TimedMediaHandler (MediaWiki official) — audio and video embedding reference
- API:Upload (MediaWiki official) — uploads, including chunked uploads
- Help:Contributing — the contributor hub
Uploading from a URL
You can also upload a file by pasting a URL instead of choosing one — use the Source file section's URL option. It works for images, PDFs, audio and video. A Validate button reads the file's metadata (for Wikimedia URLs, straight from the source in your browser):
- The Destination filename is filled automatically, normalized to lowercase with any word separator — spaces, underscores, or capitalization changes — replaced by dashes (for example
National Geographic Society Administration BuildingorNational_Geographic_Society_Administration_Buildingbecomesnational-geographic-society-administration-building). You can change it before uploading; the file extension is added automatically. - The Summary is filled with the file's description from the source, up to 2000 characters, cut at a sentence boundary when longer.
- Author and the license are pre-filled when the source provides them — check them, since attribution accuracy is your responsibility. For non-image files (PDF, audio, video) the validate step reports the file type and size instead of a preview.
For large Wikimedia files the upload itself also happens through your browser, so the wiki server never downloads the file from Wikimedia.
- The license field is pre-filled when the source names one, and the wiki checks it against the instance's license items. When it finds a match it shows a confirmation line — "License fetched from source: {value}, we think this corresponds to {label} (Q#)." — with Yes, that's right / No, let me correct. Say No to clear the field and pick the license yourself. Attribution accuracy stays your responsibility.
Embedding a GeoGebra worksheet
A GeoGebra worksheet is saved as a .ggb file. It uploads and versions exactly like any other file (Special:Upload, "Upload a new version of this file") — the accepted-format list includes ggb. Unlike an image, it embeds as an interactive applet that readers can pan, zoom and manipulate in the page.
| You type | What it does |
|---|---|
[[File:Parabola.ggb]]
|
The interactive worksheet at the default size (800 × 600). |
[[File:Parabola.ggb|600px]]
|
Fixes the width to 600 pixels; the height keeps the 4:3 proportions. |
[[File:Parabola.ggb|thumb|Caption text]]
|
A framed applet with a caption. |
[[:File:Parabola.ggb]]
|
A text link to the file page — the leading colon prevents embedding. |
Replace Parabola.ggb with your worksheet's name. The same options as images apply (width, thumb, caption, alignment). Upload a worksheet to a page to see it render.
The applet loads from a separate, cookie-less origin (ggb.ronzz.org) inside a sandboxed frame, so a worksheet cannot read this wiki's pages or your session. For the same reason, GeoGebra is configured to not run JavaScript stored inside the worksheet — worksheets that rely on embedded JavaScript may not behave exactly as they do in the GeoGebra desktop app.

