Help:Files

From Nookipedia, the Animal Crossing wiki

This article is all about using media files on Nookipedia, which consist of images, audio, video, and mixed content formats. This page will teach you how to upload files, and the markup used to place and format them for display within pages.

File formats[edit]

Nookipedia supports the upload of the following media file formats. See Special:MediaStatistics for a full breakdown of files and formats that have been uploaded.

Media type Allowed formats Possible extensions
Image PNG .png, apng
JPG .jpeg, .jpg, .jpe
GIF .gif
SVG[nb 1] .svg
WebP .webp
Audio FLAC .flac
MP3 .mpga, .mpa, .mp2, .mp3
X-FLAC .flac
WAV .wav
Video MKV .mkv
MP4 .mp4, .m4a, .m4p, .m4b, .m4r, .m4v
OGV .ogv
Quicktime .qt, .mov
WebM .webm
Mixed content PDF .pdf
  1. Note that SVG files are rendered as PNG images and thumbnailed as needed on the fly. The use of inline SVG on pages is not currently supported in the MediaWiki software.

Uploading files[edit]

New files[edit]

New files can be uploaded using the form at Special:Upload. First ensure a similar file does not already exist on the wiki using the list of uploaded files, or the list of unused files. If you don't find one then you can upload a new file using the following instructions:

Before you upload, please read our Upload Policy to ensure your file is appropriate to upload.
  1. Select the "Upload file" button in the toolbox at the bottom of the left navigation bar, or click here.
  2. Select the "Browse" button and find the source file on your computer.
  3. Type an appropriate file name into the destination filename box, being sure to follow Nookipedia's file naming conventions.
    File extensions should be formatted in all lowercase letters (e.g. .jpg not .JPG)
  4. Fill out the File Info template in the upload form. The description and source fields are required. Also add the appropriate categories underneath the template. This will typically be a subcategory of Category:Images, Category:Audio, or Category:Videos (e.g. Category:Game screenshots)
  5. Select the appropriate license from the drop-down menu. If you are unsure of which license to use, seek assistance from a staff member.
    Administrators can create new licenses using the {{LicenseBox}} template, and add them to the list by including them in MediaWiki:Licenses.
  6. Select the "Upload file" button to complete the process. After a few moments, the page will automatically direct you to the uploaded file's description page.

Replacing existing files[edit]

Existing files can be replaced with newer versions that will override the old file. Old versions will continue to be viewable in the file's history, but cannot be displayed within pages.

Replacement files are still subject to Nookipedia's upload policy.
  1. Go to the File History section of the file's description page, and select "Upload a new version of this file".
  2. Click the "Browse" button and find the source file on your computer.
  3. Describe the reason for replacing the file with a new one, or any changes made to the existing file.
  4. Select the "Upload file" button to complete the process. After a few moments, the page will automatically direct you to the uploaded file's description page.

Note that when replacing files, thumbnails will not update right away. They may appear distorted, or even show the previous version of the file. Please do not revert the file change or attempt to upload the new file again. The browser cache will update in time, but it can be manually updated by pressing Ctrl + F5 to perform a hard refresh.

Other upload methods[edit]

Certain user groups have access to additional methods of uploading files, though the relevant gadgets must first be enabled in Special:Preferences. Note that links to these special pages will render in red, even when the gadgets are enabled and the link targets are valid.

Bulk upload

Staff and Trustees can use Special:BulkUpload[nb 1] to upload multiple files at once. Filenames and extensions will be kept as-is and cannot be modified through this process, so these should be prepared in advanced by naming each file appropriately before selecting them for upload. All files will use the same file description in the summary, so this should be formatted as a broad description without reference to any specific file.

Once the upload begins, the status of each file will be displayed in a section below the summary. Files that fail to upload will be indicated here with an error code, and the process will proceed to attempt to upload the next file in the list. The upload process can be aborted by simply navigating away from the page, though this will only cancel pending uploads or those still in progress.

Uploads through this tool are marked as bot edits in recent changes.

Upload from URL

Autoconfirmed users can use Special:UploadFromURL[nb 1] to upload a single file directly from an external URL. WebP images are automatically converted to PNG.

Using files[edit]

The basic markup for adding an image to a page is

[[File:Example.png|thumb|Caption text]]


The basic markup for adding a video to a page is

[[File:Example.mp4|frame|Caption text]]

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.

Display modes[edit]

There are three display modes:

  • Basic
    • The default mode used when a display mode is not specified. The file will be displayed at full size, and inline unless a horizontal alignment is specified.
  • Thumbnailthumb or thumbnail
    • Displays a reduced-size thumbnail of the file with a caption.
  • Framedframe or framed
    • Displays the file in a thumbnail container at full-size with a caption. Not suitable for large resolution files.

Image properties[edit]

Captions[edit]

Text entered at the end of the markup is used as a caption when the file is displayed in Thumbnail or Framed modes. It does not require a code. Links and normal text formatting options can be used in captions too.

Display a text caption

[[File:Example.png|thumb|Example caption]]

Horizontal alignment[edit]

The float position of an image can be specified with "right", "left", or "center". If an alignment is not specified, the image will be horizontally positioned to the left by default. When positioned in the center, text will not flow around the file.

Position the file to the right

[[File:Example.png|right]]


Position the file to the left

[[File:Example.png|left]]


Position the file in the center

[[File:Example.png|center]]

Vertical alignment[edit]

Inline images can have their vertical alignment adjusted using "baseline", "middle", "sub", "super", "text-top", "text-bottom", "top", or "bottom". If an alignment is not specified, the image will be vertically positioned in the middle by default.

Align the bottom of the image with the baseline of the text.

[[File:Example.png|baseline]]


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.

[[File:Example.png|middle]]


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".

[[File:Example.png|sub]]


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 "X2".

[[File:Example.png|super]]


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".

[[File:Example.png|text-top]]


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".

[[File:Example.png|text-bottom]]


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.

[[File:Example.png|top]]


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.

[[File:Example.png|bottom]]

Size[edit]

Files will keep their original aspect ratio. The displayed size can be adjusted through one of two methods:

Using "upright" will request a narrower width than usual, which unlike manual sizing will respect user preferences. This can be used in conjunction with a Factor value. 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.

Reduce the width for tall, thin files.

[[File:Example.png|thumb|upright]]


Adjust a thumbnail's size to Factor times the default thumbnail size, rounding the result to the nearest multiple of 10.

[[File:Example.png|thumb|upright=Factor]]

A value can also be manually specified to scale the display of the image to a precise size.

A size can can be specified in pixels (e.g. 100px).

[[File:Example.png|Widthpx]]


Scale the file to make it the specified number of pixels in height (e.g. x150px).

[[File:Example.png|xHeightpx]]


Scale the file to be no wider and no higher than the specified number of pixels (e.g. 100x150px).

[[File:Example.png|WidthxHeightpx]]

Alt text[edit]

Specify the alt text for an image. This is intended for visually impaired readers. This typically should differ from the caption, as the text should describe the visual appearance of what is depicted in the image.

Create alt text caption

[[File:Example.png|alt=Example alt text]]

Links[edit]

By default, files will link to their own file description page, a page with information about the file itself. The link can be changed to point to a different target, or be disabled entirely.

Note that disabling a link for an image will also prevent users from being able to view it in the image viewer. Therefore, this should generally only be done for images used for stylistic purposes, such as within templates or the site's interface.

Set the file link to a specified page

[[File:Example.png|link=Name of page]]


Disable the file link. No action will occur when the file is selected.

[[File:Example.png|link=]]

Border[edit]

Using "border" will display a one-pixel border around the file. This can be useful when it is important to distinguish a file from the background it is placed on. Consider using thumb or frame instead.

Display a one-pixel border around the file

[[File:Example.png|border]]

Class[edit]

CSS classes can be used in conjunction with file markup. The class can be specified with the class= parameter used in conjunction with a valid class name (without quotation marks). Nookipedia supports the following classes for use with image files:

  • roundyimage — displays the image with rounded borders. Intended for images used in templates.
  • sprite — displays the image with nearest-neighbor scaling. Intended for use only with low-resolution sprites. Higher-resolution images will appear distorted when using this class.

Display an image with rounded borders

[[File:Example.png|class=roundyimage]]


Display an image with nearest-neighbor scaling

[[File:Example.png|class=sprite]]

Changing the displayed image[edit]

You can link to one image from a thumbnail's small double-rectangle icon, but display another image in the thumbnail itself using "thumb=" with the name of a different image. The File: prefix must be omitted from the filename used in this parameter.

The resulting image will be displayed at full size and cannot be resized, so this should generally only be used in situations where a dedicated (and appropriately-sized) thumbnail image is needed to be shown for a file.

Display a different image while keeping a link to the original image

[[File:Example.png|thumb=Nia.png]]

For PDFs, a specific page can be specified to be displayed as its image. Note that only a single page can be displayed at a time in each thumbnail.

Use specified page number as displayed PDF image

[[File:Example.pdf|page=number]]

Creating a link to a file[edit]

To create a link to a file instead of displaying it on the page, add a colon before the filename. To link directly to the file itself, rather than its description page, change the prefix from File: to Media:. This latter method must not be used solely for a file under a license which requires attribution, such as CC-BY licenses.

Create a link to a file's description page

[[:File:Example.png]]


Create a direct link to the file itself

[[Media:Example.png]]

The full path to a file with a direct hyperlink can be generated using the {{filepath:}} Magic word. Input the filename after the colon, omitting the File: prefix. If this is used within templates and the File: prefix needs to be removed, then this can used in conjunction with the Files magic word.

Create a link to a file's description page

{{filepath:Example.png}}


Remove the File: prefix automatically in templates

{{filepath:{{PAGENAME:Example.png}}}}

Audio and video-specific functions[edit]

A specific frame can be chosen to be displayed as a video's still thumbnail using "timeframe=". If this is not specified, a frame from the midpoint of the video is used by default. Time takes the form of hours, minutes and seconds separated by colons. For example:

  • thumbtime=21 – Time syntax using seconds only
  • thumbtime=0:23 – Time syntax using minutes and seconds
  • thumbtime=0:0:33 – Time syntax using hours, minutes and seconds

Use the frame from the specified time as displayed video still image

[[File:Example.mp4|thumbtime=Time]]

Audio or video files can be set to start from a specific time with "start=", using the same time syntax as above (hours, minutes, seconds).

Use the frame from the specified time as displayed video still image

[[File:Example.mp4|start=Time]]

Audio and video files can also be set to be muted by default when playback begins using muted, or made to loop continuously using loop.

Mute file by default when playback begins

[[File:Example.mp4|muted]]


Loop media continuously when playback begins

[[File:Example.mp4|loop]]

External files[edit]

Files from external sources cannot be embedded directly on Nookipedia. However, inserting a direct link to an external file will automatically format it as a working link.

Template:YouTube can be used to embed videos hosted on YouTube within pages. See the template's documentation for further information.

Galleries[edit]

A gallery of thumbnails can be created using the <gallery> tag. Files should be listed below the tag in the order they are to be displayed. The filenames do not require the File: prefix. Captions and alt text can be added in the same manner as the standard file markup.

Display modes[edit]

The gallery display mode can be changing using the mode parameter. The different modes are:

  • traditional
  • nolines
  • packed
  • packed-overlay
  • packed-hover
  • slideshow
Traditional

This is the default display mode, showing a horizontally center-aligned gallery of thumbnails.

No lines

This mode removes the border and background, and aligns the gallery to the left.

Packed

This mode removes the border and background, and brings the images close together, keeping a consistent height.

Packed overlay

This mode is similar to Packed, but captions are displayed overlaying the image.

Packed hover

This mode is similar to Packed, but captions are displayed overlaying the image only appear when hovering over the image.

Slideshow

Creates an interactive slideshow of images.

Other attributes[edit]

The gallery tag supports several additional parameters. These must be specified as attribute name-value pairs.

  • These parameters can be used in any display mode:
    • caption="{text}" — sets a text caption that will be displayed centered atop the gallery. Only plain text may be used.
    • showfilename — sets the display of filenames in the individual captions for each image
  • These parameters only function in the traditional and nolines display modes.
    • widths="{width}" — sets the maximum widths of images in pixels.
    • heights="{heights}" — sets the maximum heights of thumbnails in pixels.
    • perrow="{integer}" — sets the number of items to be displayed on each row of the gallery. The default is perrow=0 which will automatically adjust the number of items shown based on screen width.
  • These parameters only function in the slideshow display mode:
    • showthumbnails — sets the display of the thumbnail strip below the gallery.

Any html attribute allowed on a <ul> tag (e.g. id, title, class) is also supported.

Templates[edit]

Many templates support the ability for users to specify files to be displayed, typically images. The format for this is often different to the standard markup for displaying files. Consult the template's documentation for specific usage instructions.

See also[edit]

Notes[edit]

  1. 1.0 1.1 Users without the gadget enabled or the required user rights to use this feature will be presented a "No such special page" error. Additionally, links to this special page will always appear red, even if the feature can be accessed.

External links[edit]

 

Small Wikipedia Logo.svg This page uses content from Wikipedia (en). The original article was at Help:Visual file markup. The list of authors can be seen in the page history. As with Nookipedia, the text of Wikipedia is available under the Creative Commons Attribution-ShareAlike 4.0 International license.