MediaWiki:Immagini e link

Versione del 10 nov 2022 alle 09:02 di Andrea (discussione | contributi) (Creata pagina con "← MediaWiki == Immagini == <pre> options|caption caption border|caption File:examp...")
(diff) ← Versione meno recente | Versione attuale (diff) | Versione più recente → (diff)

← MediaWiki

Immagini

[[File:filename.extension|options|caption]]
[[File:example.jpg|caption]]
[[File:example.jpg|border|caption]]
[[File:example.jpg|frameless|caption]]
[[File:example.jpg|frameless|border|caption]]
[[File:example.jpg|frame|caption]]
[[File:example.jpg|thumb|caption]]


Direct links from external sites

Another possibility is to use the Special:Redirect/file page (or its alias Special:Filepath). Unlike the above example, you can link to it from external websites as well as from MediaWiki pages.

[[Special:Redirect/file/Wikipedia.png]]

The parameters height and width can also be added to return a specific size of the image. The image aspect ratio is always preserved.

https://www.mediawiki.org/w/index.php?title=Special:Redirect/file/Wikipedia.png&width=100&height=100

Link to actual file

You can use the pseudo-namespace "Media" to link to the actual file on MediaWiki pages. The link will not take you to the file description page, but instead will deliver the file itself.

[[Media:Example.jpg]]
[[Media:Example.jpg|Sunflowers]]

Link to a file description page

You can create a link to a file's file description page by using a colon (:) before File::

[[:File:Example.jpg]]
[[:File:Example.jpg|Sunflowers]]