Help:File: Difference between revisions
(Tutorial on files.) |
mNo edit summary |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{help}} | ||
'''Files''' are contained in the 6th namespace, the File namespace. | {{Todo|Examples for apng, jpg, gif, and at least one audio type (oga, mp3, and/or flac)}} | ||
'''Files''' are contained in the 6th namespace, the File namespace. A file must be uploaded to this wiki before it can be placed on a page. Files can be uploaded using [[Special:Upload]]. Choose a file to upload. Then choose a name for the file. The file name should contain the subject's name. Files can be added to an article by creating a [[Help:Link|link]] to the file in the article. Additional parameters to the file include size, the change of the image's dimensions, "thumb" if the image is to be a thumb image and alt text. | |||
==File types== | |||
{|class="wikitable" | |||
!colspan="4"|Types of files | |||
|- | |||
!File extension | |||
!Features | |||
!Transparency supported? | |||
!Example | |||
|- | |||
|png | |||
|common lossless image format | |||
|yes | |||
|[[File:Not unused.png|x40px]] | |||
|- | |||
|apng | |||
|animated, can also just use .png | |||
|yes | |||
| | |||
|- | |||
|jpg | |||
|common lossy image format | |||
|no | |||
| | |||
|- | |||
|svg | |||
|infinitely scalable without blurriness | |||
|yes | |||
|[[File:Logo mono black.svg|x40px]] | |||
|- | |||
|gif | |||
|common animated image format | |||
|yes | |||
| | |||
|- | |||
|oga / mp3 / flac | |||
|audio | |||
|N/A | |||
| | |||
|} | |||
==Tutorial== | ==Tutorial== | ||
Line 7: | Line 48: | ||
!Code!!Result | !Code!!Result | ||
|- | |- | ||
|<pre><nowiki>[[File: | |<pre><nowiki>[[File:Wiki.png]]</nowiki></pre> | ||
|[[File: | |[[File:Wiki.png|500px]] | ||
|} | |} | ||
This also works for audio files. | |||
This produces an image with no frame and at its original resolution, which is generally not a good thing. To fix these things, put <code>|thumb</code> after the file name, which will turn it into a thumbnail. | This produces an image with no frame and at its original resolution, which is generally not a good thing. To fix these things, put <code>|thumb</code> after the file name, which will turn it into a thumbnail. However, this will also add a white background, even if the original image does not have a background. | ||
{|class="wikitable" | {|class="wikitable" | ||
!Code!!Result | !Code!!Result | ||
|- | |- | ||
|<pre><nowiki>[[File: | |<pre><nowiki>[[File:Wiki.png|thumb]]</nowiki></pre> | ||
|[[File: | |[[File:Wiki.png|thumb]] | ||
|} | |} | ||
Line 23: | Line 65: | ||
!Code!!Result | !Code!!Result | ||
|- | |- | ||
|<pre><nowiki>[[[[File: | |<pre><nowiki>[[[[File:Wiki.png|thumb|Fanon Wiki's logo.]]</nowiki></pre> | ||
|[[File: | |[[File:Wiki.png|thumb|Fanon Wiki's logo.]] | ||
|} | |} | ||
Finally, it is possible to change the size of images and their position on the page with additional pieces of text before the caption. <code>250px</code> will make the image 250 pixels wide (this number can be changed, and the default size is 200 pixels wide) | Finally, it is possible to change the size of images and their position on the page with additional pieces of text before the caption. <code>250px</code> will make the image 250 pixels wide (this number can be changed, and the default size is 200 pixels wide. put xnumberpx to change it by height instead of width) <code>left</code> will place the image on the left of the screen (<code>center</code> and <code>right</code> also work, and right is the default position). Size adjustment can be done with non-thumb images as well. | ||
{|class="wikitable" | {|class="wikitable" | ||
!Code!!Result | !Code!!Result | ||
|- | |- | ||
|<pre><nowiki>[[File: | |<pre><nowiki>[[File:Wiki.png|thumb|left|250px|Fanon Wiki's logo.]]</nowiki></pre> | ||
|[[File: | |[[File:Wiki.png|thumb|left|250px|Fanon Wiki's logo.]] | ||
|} | |} | ||
Line 48: | Line 90: | ||
</gallery> | </gallery> | ||
|} | |} | ||
If you would like to link to a file page without embedding the file, put a colon before the word File: in the link. It will then be treated as a normal text link. For audio files, do not use modifiers. | |||
Latest revision as of 00:16, 28 January 2024
|
|
Files are contained in the 6th namespace, the File namespace. A file must be uploaded to this wiki before it can be placed on a page. Files can be uploaded using Special:Upload. Choose a file to upload. Then choose a name for the file. The file name should contain the subject's name. Files can be added to an article by creating a link to the file in the article. Additional parameters to the file include size, the change of the image's dimensions, "thumb" if the image is to be a thumb image and alt text.
File types
Tutorial
To make an image appear on an article, link to the page containing the image, which will start with File:
and end with the image's file format.
Code | Result |
---|---|
[[File:Wiki.png]] |
This also works for audio files.
This produces an image with no frame and at its original resolution, which is generally not a good thing. To fix these things, put |thumb
after the file name, which will turn it into a thumbnail. However, this will also add a white background, even if the original image does not have a background.
Code | Result |
---|---|
[[File:Wiki.png|thumb]] |
It is possible to add a caption to images by putting text after another vertical bar.
Code | Result |
---|---|
[[[[File:Wiki.png|thumb|Fanon Wiki's logo.]] |
Finally, it is possible to change the size of images and their position on the page with additional pieces of text before the caption. 250px
will make the image 250 pixels wide (this number can be changed, and the default size is 200 pixels wide. put xnumberpx to change it by height instead of width) left
will place the image on the left of the screen (center
and right
also work, and right is the default position). Size adjustment can be done with non-thumb images as well.
Code | Result |
---|---|
[[File:Wiki.png|thumb|left|250px|Fanon Wiki's logo.]] |
An alternative way to show images is in a gallery. Galleries display images at small sizes in a grid. To make one, surround a section with <gallery>
at the start and </gallery>
at the end, and place each file name (without the File:
prefix) on a new line. Image captions can be placed after a vertical bar.
Code | Result |
---|---|
<gallery> File:Logo-horizontal.png|Fanon Wiki's logo (horizontal) File:Logo mono black.png|Fanon Wiki's logo in a black color scheme. </gallery> |
If you would like to link to a file page without embedding the file, put a colon before the word File: in the link. It will then be treated as a normal text link. For audio files, do not use modifiers.