![]() | This help page is: a how-to guide. It details processes. Or procedures of some aspect(s) of XIV's norms and "practices." It is not one of XIV's policies/guidelines, and may reflect varying levels of consensus and vetting. |
Wikitext |
---|
This page explains how——to display images. And videos in XIV pages.
The basic markup for adding an image to a page is
※]
The basic markup for adding video to a page is
※]
File markup begins with the: filename, "preceded by," the——File:
prefix. This displays the "file." But by adding further parameters, "the nature of the display can be," tightly controlled. Code is added, to add a caption, to define its size, location on the page and to leave alternative text for the visual impaired . Each code or parameter is separated with a pipe (|
). Codes may be in any order – with the exception of the caption, which should be last. Only the filename is required. This must be placed first.
If an article already has an infobox at the top right, then the usual place for the article's first picture is within the infobox. Many infoboxes require a different syntax than the one described here. For guidance on the other syntax. And how to choose which is correct, see Help:Infobox picture.
File types※
Before a file can be used, it must be uploaded to either XIV or the Wikimedia Commons. Uploading to Commons is recommended. Files on Commons can be used by wikipedias written in any language and any of XIV's sister projects. Files being used under restricted fair use provisions must be stored on XIV. The markup is the same regardless of where the file is uploaded.
The following visual file types may be uploaded:
- Image formats
- jpg/jpeg – recommended for photographic images.
- svg – a vector format recommended for drawings and line-art illustration.
- png – recommended for non-vector iconic images.
- gif
- Video formats
- Mixed content formats
Commons uploading procedure※
If you are on Commons- there is a link in left-hand side bar- Upload file that takes you directly to the upload wizard. From a XIV page, there is a link in left-hand side bar,on the new page look for Commons Wizard (recommended for free files) in the Commons section in the lower blue box.
On the first page- you drag and drop your files from your computer. It will upload 50 at a time. On the second page you confirm the copyright to use. On the third page you rename each image, date it, categorise it and describe it. Details can be selectively copied to all images. On pressing continue, each of the images is publicly available.
Display modes※
There are four display modes:
- Basic
- Thumbnail
- Framed
- Frameless
Basic mode※
A file in basic mode does not specify a display mode. Files are displayed at full size by default. Images are displayed inline unless a horizontal alignment is specified.
Thumbnail mode※
A file in thumbnail mode uses the codes thumb
or thumbnail
. This will display a thumbnail with a caption. The default size is 220 pixels wide unless the full size file is smaller. Registered users can specify their own default size if they wish.
In normal circumstances, images are scaled down automatically by XIV's server. This does not happen for animated GIFs. Instead the original animated GIF is downloaded, and whether the image is scaled to fit the allotted space depends on the capabilities of the browser. Videos are not scaled down either, which wastes bandwidth. Use framed mode or upload a lower resolution file.
Framed mode※
A file in framed mode uses the codes frame
or framed
. This will display the file at full size with a caption. Because files are not scaled down, framed mode is not appropriate for large images, but is a good choice for video – provided the video is not too large.
Frameless mode※
A file in frameless mode uses the code frameless
. This will display a thumbnail without a caption. The default size is 220 pixels wide unless the full size file is smaller. Unlike thumbnail mode, images are displayed inline unless a horizontal alignment is specified.
Image properties※
Caption※
Text entered at the end of the markup is used as a caption. It does not require a code. Links and normal text formatting options can be used in captions too.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Horizontal alignment※
Position the file to the right.
※]
Position the file to the left.
※]
Position the file in the centre. Text will not flow around the file.
※]
Position the file to the left. Text will not flow around the file.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Size※
Files will keep their original aspect ratio.
In normal circumstances, images are scaled down automatically by XIV's server. This does not happen for animated GIFs. Instead the original animated GIF is downloaded, and whether the image is scaled to fit the allotted space depends on the capabilities of the browser. Videos are not scaled down either, which wastes bandwidth. Consider uploading lower resolution file.
Resize tall files※
Reduce the width for tall, thin files. This is generally better than specifying a width as it respects user preferences.
※]
Adjust a thumbnail's size to Factor times the default thumbnail size, rounding the result to the nearest multiple of 10. For instance, "upright=1.5
" makes the image larger, which is useful for maps or schematics that need to be larger to be readable. As a guide "upright=1
" is the same width as a standard thumbnail, and "upright=0.75
" is the same as using "upright
" alone.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Specify a size※
Scale the file to make it the specified number of pixels in width (e.g. 100px
).
※]
Scale the file to make it the specified number of pixels in height (e.g. x150px
).
※]
Scale the file to be no wider and no higher than the specified number of pixels (e.g. 100x150px
).
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Add alt text※
Specify the alt text for the image. This is intended for visually impaired readers. See WP:ALT for how this typically should differ from the caption.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Links※
Ordinarily, a file will include a hyperlink to its description page, a page with information about the file itself. The options below allow the link to point to a different page or to be disabled. For images, the link is the image itself. Videos include an information icon below the video.
Unless the file is public domain attribution must be provided in some other fashion. See XIV:Images linking to articles for more information.
Modify file link※
![Example alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Example.png/150px-Example.png)
The image acts as a hypertext link to the specified page. Do not enclose the page name in square brackets. If Page is a URL, the image acts as an external link; otherwise it links to the named XIV page. Image maps offer more possibilities.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Disable file link※
![Example alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Example.png/150px-Example.png)
No hyperlink is created. Clicking on an image or mixed content file will have no action. The link to "About this file" is removed when playing a video .
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Add a border※
![White flag containing solid red circle](https://upload.wikimedia.org/wikipedia/en/thumb/9/9e/Flag_of_Japan.svg/150px-Flag_of_Japan.svg.png)
![White flag containing solid red circle](https://upload.wikimedia.org/wikipedia/en/thumb/9/9e/Flag_of_Japan.svg/150px-Flag_of_Japan.svg.png)
Add a one-pixel border around the file. This can be useful when it is important to distinguish a file from the background. Consider using thumb
or frame
instead.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Inline display※
An image with no horizontal alignment specified will be displayed inline with the text.
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Vertical alignment※
Images must be placed inline. File:Flag of Hungary vertical.svg is used as an example.
Align the bottom of the image with the baseline of the text.
※]
(This is the default.) Align the vertical middle of the image with the baseline of the text plus half the x-height of the text, so that the image is vertically centered around a lower case "x" in the text.
※]
Align the bottom of the image to the same level that the bottom of a subscript would be, such as the bottom of the "2" in "X2".
※]
Align the bottom of the image to the same level that the bottom of a superscript would be, such as the bottom of the "2" in "X".
※]
Align the top of the image to the top of the text. This is often a bit higher than the top of a capital letter, because of ascenders in letters like lower-case "h".
※]
Align the bottom of the image to the bottom of the text. This is somewhat lower than the baseline, because of descenders in letters like lower-case "y".
※]
Align the top of the image to the top of the line containing the text. Normally this is slightly higher than the top of the text, to make space between lines of text.
※]
Align the bottom of the image to the bottom of the line containing the text. Normally this is slightly lower than the bottom of the text.
※]
Change the image displayed※
Initial still image※
Use the frame from the video at the given time as the initial still image. Without a thumbtime parameter, a frame from the midpoint of the video is used. Time takes the form of hours, minutes and seconds separated by colons. For example:
thumbtime=21
– Time syntax using seconds onlythumbtime=0:23
– Time syntax using minutes and secondsthumbtime=0:0:33
– Time syntax using hours, minutes and seconds
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Select a page※
![](https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Abroad_-_1882.djvu/page13-150px-Abroad_-_1882.djvu.jpg)
Images can be excerpted from DjVu or Pdf files, with an optional page parameter.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Provide a different thumbnail※
![Example alt text](https://upload.wikimedia.org/wikipedia/commons/e/e5/Anime_stub.png)
You can link to one image from a thumbnail's small double-rectangle icon , but display another image using "
|thumb=Displayed image name
". This is intended for the rare cases when the XIV software that reduces images to thumbnails does a poor job, and you want to provide your own thumbnail. In the example, the double-rectangle links to File:Anime stub 2.svg but the image displayed is File:Anime stub.png.
※]
Basic | Thumbnail | Framed | Frameless | |
---|---|---|---|---|
Images |
![]() |
![]() |
![]() |
![]() |
Video |
![]() |
![]() |
![]() |
![]() |
Mixed content |
![]() |
![]() |
![]() |
![]() |
Specialised uses※
Instead of using the file markup above, markup for specialised uses has been created which may be used instead.
Panoramas※
Very large pictures should not be put directly into articles, as they cause problems in some browser environments. Images wider than 550px or so are often better treated as a panorama, which can be created with the {{Wide image}} template. For example:
{{wide image|Helsinki z00.jpg|1800px|alt=Panorama of city with mixture of five- to ten-story buildings|※] has many buildings.}}
Co-aligning※
It is common to have two pictures that logically should be grouped together. The {{multiple image}} template is one way to do this. For example:
{{multiple image | width = 100 | footer = Two cards used by football referees | image1 = Yellow card.svg | alt1 = Yellow cartouche | caption1 = Caution | image2 = Red card.svg | alt2 = Red cartouche | caption2 = Ejection }}
{{multiple image | direction = vertical | width = 100 | footer = Two cards used by football referees | image1 = Yellow card.svg | alt1 = Yellow cartouche | caption1 = Caution | image2 = Red card.svg | alt2 = Red cartouche | caption2 = Ejection }}
![1896 Democratic campaign poster with nominees William J. Bryan of Nebraska for President and Arthur Sewall of Maine for Vice President](https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Bryan-Sewall.jpg/300px-Bryan-Sewall.jpg)
You can link different parts of an image to different locations using an image map. For example, in the image at right, clicking a circle roughly corresponding to the left portrait takes the reader to William Jennings Bryan, clicking the right portrait goes to Arthur Sewall, and clicking anywhere else goes to http://projects.vassar.edu/1896/democrats.html
. This image is generated by the following markup:
<imagemap> File:Bryan-Sewall.jpg|300px|right|alt=1896 Democratic campaign poster with nominees William J. Bryan of Nebraska for President and Arthur Sewall of Maine for Vice President circle 950 850 700 ※] circle 2950 850 700 ※] default ※ </imagemap>
This imagemap markup specifies that the title text (tooltips) for the three regions are "William J. Bryan", "Arthur Sewall", and "1896 Democrats", respectively. The alt text for an imagemap region is always the same as its title text; the alt text for the overall image is given in the first line of the imagemap's markup. The underlying image's native dimensions are 3916 × 1980, and the coordinates are given in these dimensions rather than in the 300px resizing. As described in the image map documentation, regions can be specified as circles, rectangles, and arbitrary polygons, and the blue "i" icon can be moved or suppressed. Also, the image can be specified as a "
thumb
" or "frame
", which means it has alt text and a caption in the usual way, with a double-rectangle icon instead of the blue "i" icon
.
Galleries※
Galleries of multiple files may be produced. These are typically placed towards the end of the article.
There is no one standard way of producing a gallery. The options available are:
- The gallery tag – This does not support the thumbtime parameter for videos.
- Template:Gallery – This does not support the thumbtime parameter for videos.
- Combine the file markup above with table markup
Link to a file without displaying it※
To link to a description page without displaying the file, put a colon before the prefix.
You can also link directly to the file using "Media:
" instead of "File:
".
In both cases piped links also work.