Help:Wikitext/Images



This article covers how to display images on a wiki. Any logged in user can upload images to a Wikia - see Help:Uploading files for help on how to do so. Help:Image placeholder is another way to make it easy for users to upload and display images in one step.

The easiest way to add an existing image to an article is to use the "Add Images" button on either the rich text editor or the edit toolbar -- see Help:Add Images for detailed help on using this wizard.

However, if you prefer not to use the wizard, or wish to understand the underlying code that controls how MediaWiki displays an image within an article, read on!

Displaying images using wikitext
Once a desired image file is uploaded, copy or otherwise make note of the image's name: it will be in the format "File:Filename.jpg". (Note: this name is case-sensitive: using "File:Filename.JPG" will fail to display the image.


 * Please note, as of MediaWiki 1.14 (deployed on Wikia in April 2009), the image namespace has changed from "Image:" to "File:". Both forms can be used, but File is the namespace shown on the wiki.

Simple image insertion
The normal method of adding images to a page is to use the following code:



This produces an image 'floated' on the right side of the page. On this article, the table of contents pushes it down (by design) - but when there is nothing else next to the text, the image will show immediately next to it.

More advanced image display techniques
The most basic syntax for displaying an image is. Additional parameters can be added between pipe ("|") characters, including:
 * frame - places a frame around the image without altering its size. The original image size is used. Sizing does not work when |frame| is used.
 * thumb - creates a reduced-size thumbnail image, contained in a frame
 * ##px - specify the desired width of the image in pixels.
 * Note that it is usually best to allow MediaWiki to automatically size images and thumbnails to suit the user's preferences and monitor size and resolution; hard-coding image sizes in this way can cause unwanted behavior at some resolutions.
 * caption - the last parameter in the image syntax will be used to provide a caption in a thumbnailed or framed image. Captions can contain links and other wiki syntax.

Code examples


See also: Wikipedia:Extended image syntax.

Notes on resizing images
When sizing option is used, the MediaWiki software can generate downsized image thumbnails, improving the quality of the thumbnail.

However, MediaWiki does not generate upscaled images, so if you make an image larger than the original size, it will use the client's (browser's) method of upscaling images. The effect can depend on your browser.

Can I fix the placement of the image if the image has caption?
Let's say you want something like this: This is the text............ Image here with caption! Another text................

The image syntax "none" is useless in this case because you want to use caption too.

Currently there is no image-related syntax that could help with this, but you can use the following code or template to achieve it: put  just below the image (this is sometimes replaced on wikis with the template   or

Sample code
This is the text............



Another text................

Result
This is the text............



Another text................

Can I display many images together?
An easy way to display lots of images is to use a gallery. Wikia's new "Photo Gallery" tool helps make this easier: see here for more info.

You can set the title of the gallery ("caption") after creating the gallery by clicking the

Brackets are used only for adding links within captions. Captions are optional. Images are separated by newlines. By default the images and captions will align to the left, you can specify  or   in the initial gallery tag to change the alignment.

Can I link images to articles?
Yes, using the new link= syntax introduced in MediaWiki 1.14. The following are all valid usages of the link ability:



This is best used for navigational images, such as shown by on the circular images on here. Note, this technique only works with unframed/unthumbnailed images.

What image licenses are acceptable on Wikia?
Freely licensed images (such as cc-by or cc-by-sa) or public domain images are strongly preferred on Wikia. Use the Help:Import free images tool to search for and import such images from Flickr for use on your wiki.

Copyright-violating images are subject to deletion. Copyright information must be added to the image description page of every uploaded image.

How do I specify the license?
All images should have a tag added to the Image description page stating which license they are under. For example, typing GFDL on an image description page should display something like:

See Help:Image copyright tags for details.

Can I use externally hosted images?
Although there are some exceptions, externally hosted images may not usually be displayed on Wikia. Please see the page about externally hosted images.

Can I upload video and other files?
If they are not in violation of any copyright, you may store video and sound files on your wiki, but there is a size-per-file limit of 5MB, so large files might be an issue.

Alternatively, you can also display videos stored on YouTube (and certain other sites) directly on your wiki pages.

It is recommended that you upload files which are too large for local upload to another site and link to them there instead. For example, you can use the Wikimedia commons if the file would also be useful to a Wikimedia project (such as Wikipedia), or to sites like Ourmedia.

How do I add a logo to my wiki?
Administrators can change the logo of a wiki by uploading a new image over File:Wiki.png. Similarly, the favicon (the icon next to the URL in the browser's address bar, and used in many toolbars and bookmark/favorite lists) can be changed by uploading a new image to File:Favicon.ico. It is recommended that administrators protect these files from unauthorized changes.

For details on logo images, see Help:Logo and Help:Favicon.