MediaWiki:Immagini e link

← 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]]

Opzioni:

  • resize:
    • {width}px
    • x{height}px
    • {width}x{height}px
    • upright — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images whose height is larger than width). Setting will display the image at the user's default image width. |upright=2.0| will display the image at double the user's default width.
  • Horizontal alignment option: one of left, right, center, none
  • Vertical alignment option: one of baseline, sub, super, top, text-top, middle, bottom, text-bottom

Fonti:

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]]
[[Media:.....pdf|Articolo in PDF]]

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]]