Help:Images: Difference between revisions

Jump to navigation Jump to search
4,706 bytes added ,  9 June 2023
update links
(→‎Advanced options: notes about thumbnail/frames)
(update links)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Header Nav|game=StrategyWiki:Guide}}
{{Header Nav|game=StrategyWiki:Guide}}
{{floatingtoc}}
One significant feature of StrategyWiki guides is that you can add images, and place them anywhere you like. This page deals with the specifics of placing and uploading images on pages.
One significant feature of StrategyWiki guides is that you can add images, and place them anywhere you like. This page deals with the specifics of placing and uploading images on pages.


A picture is worth a thousand words. If you're trying to describe a route or puzzle solution that takes a lot of words to explain, it might be easier to draw it and refer to the map. Please use restraint when uploading images or other media to a game guide. While you are encouraged to use as many images as you feel necessary for describing elements of the game, each should be relevant, important, and include informative captions (where appropriate). An image should add to the informative value of a guide. Do not upload images for the sole purpose of making a guide "look cool".
A picture is worth a thousand words. If you're trying to describe a route or puzzle solution that takes a lot of words to explain, it might be easier to draw it and refer to the map. Please use restraint when uploading images or other media to a game guide. While you are encouraged to use as many images as you feel necessary for describing elements of the game, each should be relevant, important, and include informative captions (where appropriate). An image should add to the informative value of a guide. Do not upload images for the sole purpose of making a guide "look cool".


{{-}}
==Uploading==
==Uploading==
{{details|StrategyWiki:Guide/Image naming|image naming and categorization|the image policy}}
{{details|StrategyWiki:Guide/File uploads|image naming and categorization|the image policy}}
You can upload images from the [[Special:Upload|upload page]]. The first part to uploading an image is to choose the file that you are about to upload. To do this click on "Browse" and select the wanted file. The default name provided will match the name of the file on your local computer, so it will need to be renamed if it doesn't conform to the image naming policy. If you are uploading from a source on the web, enter the full URL into the provided box. When copying an image from another website, you will have to enter the filename yourself. Remember to place the URL you copied from in the summary section so that others know where it was copied from (this helps others verify that the image complies with [[StrategyWiki:Guide/License|StrategyWiki's licensing]]). Alternatively, you can click on a red image link to be taken to the upload page with the named filled in from the link.
You can upload images from the [[Special:Upload|upload page]].
 
;File sizes and file extensions
StrategyWiki has a filesize limitation of ~2MB. We prefer to have the smallest file sizes possible to minimize hard drive disk space and bandwidth usage (this does not mean you need to go through our file library to optimize every png file; in fact, uploading new versions does not save us disk space because we retain old versions of the images). Please keep file sizes, and resolutions to a reasonable size. If the image will be used as a thumbnail, then it should be close to 250x250 pixels to match the default thumbnail resolution. E.g. see [[Mega Man X/Chill Penguin]] for an example of small file size, but high quality thumbnails.
 
We prefer png files because they can be compressed the lowest and render thumbnails well. Jpg are great for offering low file sizes for high resolution photos, and have no problems here. Gif files should only be used for animations, as StrategyWiki currently cannot render gif thumbnails.
 
To get the lowest file size before uploading:
#Use a photo editing tool like The GNU Image Manipulation Program (GIMP) to open your file or capture it with the print screen function.
#Please save (or 'export') your file as a png, then run it through a compression tool. There are many free websites available to do this (please Google something like "online png compression tool").
#Once you use a tool to compress the file, download your file and rename, or overwrite the original file. Or, upload the image to StrategyWiki from the directory/folder you downloaded it to.


Follow these steps when uploading an image:
;How to upload
#'''Naming''': properly name your image with the name of the guide to which it belongs or its abbreviation, followed by a one or two word description of the image, such as a character's name or a level's name. The extension, ".jpg", ".png", ".gif", etc., is case-sensitive and all lowercase is preferred.
# Go to the [[Special:Upload|upload page]].
#'''Summary''': here you put a description of the image with a link to the guide on which it will be used. For example, "Box art from <nowiki>[[Super Mario Bros.]]</nowiki>." If the image is from someone else, '''attribute''' them here, preferably with a URL.
# Choose the file that you are about to upload.
#'''Categories''': below the summary, put any applicable [[:Category:Images|image categories]] and the guide-specific category. For example, "<nowiki>[[Category:Box artwork]][[Category:Super Mario Bros. images]]</nowiki>". Note that the word "images" in the guide-specific category is lowercase.
#* Option 1: select "'''Source: filename'''" (the first circle button, it may already be selected). Use this to upload from your computer.
#** To do this, click 'Choose File'. In the pop-up window find your file, then click 'Open'. The upload page will now show the path/filename and maybe a thumbnail on the right. The default name provided will match the name of the file on your local computer, so it will need to be renamed if it doesn't conform to the [[StrategyWiki:Guide/File uploads|image naming policy]].
#* Option 2: "''''Source URL'''" - copy from another website. If you are uploading from a source on the web, enter the full URL into the provided box. When copying an image from another website, you will have to enter the filename yourself. Remember to also place the URL into the summary section so that others know where it was copied from (this helps others verify that the image complies with [[StrategyWiki:Guide/License|StrategyWiki's licensing]]). Alternatively, you can click on a red image link to be taken to the upload page with the named filled in from the link. One helpful way to deal with this, if you are copying a filename from a gallery or thumbnail preview, is to put the filename in the summary field, then put the URL into place. Replacing the bad filename with a good one is just one step away - copy it from the summary field where you temporarily put it (please remove it from the summary before submitting).
# '''Naming''': properly name your image with the name of the guide to which it belongs or its abbreviation, followed by a one or two word description of the image, such as a character's name or a level's name. The destination filename should be something clear like 'War3RoC Sylvanas-base Map.png' (this sufficiently references the game [[WarCraft III: Reign of Chaos]], the level it applies to, and the type of image it is). The extension, ".jpg", ".png", ".gif", etc., is case-sensitive and all lowercase is preferred. For details, see the [[StrategyWiki:Guide/File uploads|image naming policy]].
# '''Summary''': here you put a description of the image with a link to the guide on which it will be used. For example, "Box art from <nowiki>[[Super Mario Bros.]]</nowiki>." If the image is from someone else, '''attribute''' them here, preferably with a URL.
#* '''Categories''': below the summary, put any applicable [[:Category:Files|file categories]] and the guide-specific category. For example, "<nowiki>[[Category:Box artwork]][[Category:Super Mario Bros. images]]</nowiki>". Note that the word "images" in the guide-specific category is lowercase. To make these readable, and to follow Wikipedia's standards for where to put categories and how to display them, we prefer to put a line break (press enter) between the categories, so that only one category is on each line. This makes it easier to read them. Finally, please alphabetize the categories.


===Image Formats===
===Image Formats===
Line 25: Line 43:
==Using uploaded files==
==Using uploaded files==
To use an image or other file which has been uploaded to the wiki, use:
To use an image or other file which has been uploaded to the wiki, use:
*<code><nowiki>[[File:SMB NES Box.jpg]]</nowiki></code>
* <code><nowiki>[[File:SMB NES Box.jpg]]</nowiki></code>
If you add a pipe (|) and some text after the filename, the text will be used as alternative text for text-only browsers and for the tooltip when you hover the mouse of it:
If you add a pipe (|) and some text after the filename, the text will be used as alternative text for text-only browsers and for the tooltip when you hover the mouse of it:
*<code><nowiki>[[File:SMB NES Box.jpg|alternative text]]</nowiki></code>
* <code><nowiki>[[File:SMB NES Box.jpg|alternative text]]</nowiki></code>


If you don't want to display the image, you can link to the file's description page, by adding a colon:
If you don't want to display the image, you can link to the file's description page, by adding a colon:
*<code><nowiki>[[:File:SMB NES Box.jpg]]</nowiki></code>
* <code><nowiki>[[:File:SMB NES Box.jpg]]</nowiki></code>
To bypass the description page and link directly to a file , use the "Media" pseudo-namespace:  
To bypass the description page and link directly to a file , use the "Media" pseudo-namespace:  
*<code><nowiki>[[Media:SMB NES Box.jpg]]</nowiki></code>
* <code><nowiki>[[Media:SMB NES Box.jpg]]</nowiki></code>
You can also make piped links if you want some other text to be used:
You can also make piped links if you want some other text to be used:
*<code><nowiki>[[:File:SMB NES Box.jpg|link text]]</nowiki></code>
* <code><nowiki>[[:File:SMB NES Box.jpg|link text]]</nowiki></code>
*<code><nowiki>[[Media:SMB NES Box.jpg|link text]]</nowiki></code>
* <code><nowiki>[[Media:SMB NES Box.jpg|link text]]</nowiki></code>


==Image placement==
==Image placement==
{|{{prettytable}}
{| {{prettytable}}
|-
!Description
!Description
!You type…  
!You type…  
Line 48: Line 65:
<code><nowiki>[[File:SMB NES Box.jpg|Super Mario Bros.]]</nowiki></code>
<code><nowiki>[[File:SMB NES Box.jpg|Super Mario Bros.]]</nowiki></code>
|
|
[[File:SMB NES Box.jpg|Super Mario Bros.]]
[[File:SMB NES Box.jpg|250px|Super Mario Bros.]]
|-
|-
|Link to description page
|Link to description page
Line 66: Line 83:
[[Media:SMB NES Box.jpg|Super Mario Bros.]]
[[Media:SMB NES Box.jpg|Super Mario Bros.]]
|-
|-
|Thumbnail (100 pixels wide, with caption)
|Frame (with caption)
|
<code><nowiki>[[File:3 Ninjas Kick Back SNES box.jpg|frame|3 Ninjas Kick Back]]</nowiki></code>
|
[[File:3 Ninjas Kick Back SNES box.jpg|frame|3 Ninjas Kick Back]]
|-
|Thumbnail (default thumbnail width, with caption)
|
|
<code><nowiki>[[File:SMB NES Box.jpg|thumb|Super Mario Bros.]]</nowiki></code>
<code><nowiki>[[File:SMB NES Box.jpg|thumb|Super Mario Bros.]]</nowiki></code>
|
|
[[File:SMB NES Box.jpg|thumb|Super Mario Bros.]]
[[File:SMB NES Box.jpg|thumb|Super Mario Bros.]]
|-
|Thumbnail (maximum width to 150px)
|
<code><nowiki>[[File:SMB NES Box.jpg|thumb|150px|Super Mario Bros.]]</nowiki></code>
|
[[File:SMB NES Box.jpg|thumb|150px|Super Mario Bros.]]
|-
|Thumbnail (maximum dimension set to 150px)
|
<code><nowiki>[[File:SMB NES Box.jpg|thumb|150x150px|Super Mario Bros.]]</nowiki></code>
|
[[File:SMB NES Box.jpg|thumb|150x150px|Super Mario Bros.]]
|}
|}


Line 77: Line 112:
  <code><nowiki>[[File:{name}|{options}]]</nowiki></code>
  <code><nowiki>[[File:{name}|{options}]]</nowiki></code>
Where options can be zero or more of the following, separated by pipes:
Where options can be zero or more of the following, separated by pipes:
*<code>thumb</code>, <code>thumbnail</code>, or <code>frame</code>: Controls how the image is formatted. Thumbnailed images are typically smaller, and what should normally be used for in-guide images. Framed images are similar to thumbnailed images, but are not scaled down, while if this option is left out entirely, the image is displayed at full size without any border or embellishment. Use frames on images that don't need to be scaled down or have a caption. Use thumbnails to scale large images down to the default size (250px wide). If you use a thumbnail, put a caption! Remember, users can increase thumbnail size in their preferences.
* <code>thumb</code>, <code>thumbnail</code>, or <code>frame</code>: Controls how the image is formatted. Thumbnailed images are typically smaller, and what should normally be used for in-guide images. Framed images are similar to thumbnailed images, but are not scaled down, while if this option is left out entirely, the image is displayed at full size without any border or embellishment. Use frames on images that don't need to be scaled down or have a caption. Use thumbnails to scale large images down to the default size (250px wide). If you use a thumbnail, put a caption! Remember, users can increase thumbnail size in their preferences.
*<code>left</code>, <code>right</code>, <code>none</code>: Controls the alignment of the image or thumbnail on the page. Thumbnail images default to floating to the right.
* <code>left</code>, <code>right</code>, <code>none</code>: Controls the alignment of the image or thumbnail on the page. Thumbnail images default to floating to the right.
*<code>{width}px</code>: Resizes the image to the given width in pixels. Note that use of this option is discouraged for thumbnailed images, as it means people can't specify the thumbnail size they want to view in their [[StrategyWiki:Guide/Preferences#Files|preferences]].
* <code>{width}px</code>: Resizes the image to the given width in pixels. Note that use of this option is discouraged for thumbnailed images, as it means people can't specify the thumbnail size they want to view in their [[StrategyWiki:Guide/Preferences#Files|preferences]].
*<code>{caption text}</code>: A short description of the image and what it shows. This will be displayed under the image for <tt>thumb</tt> and <tt>frame</tt> images.
* <code>{caption text}</code>: A short description of the image and what it shows. This will be displayed under the image for <tt>thumb</tt> and <tt>frame</tt> images.
*<code>link=''Destination''</code>: This is a named parameter, meaning you ''must'' put in "<code>link=</code>" before the destination. Using this option navigates the browser to wherever you specify when the user clicks the image (ex. <nowiki>[[File:Super Mario Bros. cover.jpg|link=Super Mario Bros.]]</nowiki>). Note that link brackets (<nowiki>[[</nowiki> and ]]) are not used with this option. Normally, clicking the image takes you to the image's information page, so when using this option, it's helpful to make it obvious to readers that the image serves as a link. Currently, using this option negates any alternate text you may try to use, and the "<code>alt=</code>" named parameter also currently doesn't work. This means you cannot modify the words in the tooltip that pops up when hovering over the image.
* <code>link=''Destination''</code>: This is a named parameter, meaning you ''must'' put in "<code>link=</code>" before the destination. Using this option navigates the browser to wherever you specify when the user clicks the image (ex. <nowiki>[[File:Super Mario Bros. cover.jpg|link=Super Mario Bros.]]</nowiki>). Note that link brackets (<nowiki>[[</nowiki> and ]]) are not used with this option. Normally, clicking the image takes you to the image's information page, so when using this option, it's helpful to make it obvious to readers that the image serves as a link. Currently, using this option negates any alternate text you may try to use, and the "<code>alt=</code>" named parameter also currently doesn't work. This means you cannot modify the words in the tooltip that pops up when hovering over the image.
* <code>class=''custom class'''</code>: Similar to <code>link</code> this is also a named parameter. This allows you to specify custom styles for the images. For example, <code>class=pixelart</code> will allow upscaling pixel art images without blurring. <code>class=imgmaxwidth</code> will size the image to fill the maximum width, and resize on smaller screens.
The options can be given in any order. If a given option does not match any of the other possibilities, it is assumed to be the caption text. Caption text can contain wiki links or other formatting.
The options can be given in any order. If a given option does not match any of the other possibilities, it is assumed to be the caption text. Caption text can contain wiki links or other formatting.


Line 107: Line 143:
is formatted as:
is formatted as:
<gallery caption="Super Mario Bros. boxes">
<gallery caption="Super Mario Bros. boxes">
File:SMB NES Box.jpg|Item 1
File:SMB NES Box.jpg|a link to [[Help:Contents]]
File:SMB NES Box.jpg
File:SMB NES Box.jpg
File:SMB NES Box.jpg|''italic caption''
</gallery>
===Special parameters (attributes and values)===
A great, recommended way to use the gallery tag is to add additional parameters. For example, you can make the gallery images large and centered by using the 'modes' parameter set to 'packed' and the 'heights' parameter to force them to be large thumbnails. More details on parameters can be viewed [[wp:Help:Gallery tag|here]]. Example:
<pre>
<gallery mode=packed heights=200px caption="Super Mario Bros. boxes">
File:SMB NES Box.jpg|Item 1
File:SMB NES Box.jpg|a link to [[Help:Contents]]
File:SMB NES Box.jpg
File:SMB NES Box.jpg
File:SMB NES Box.jpg|''italic caption''
</gallery>
</pre>
is formatted as:
<gallery mode=packed heights=200px caption="Super Mario Bros. boxes">
File:SMB NES Box.jpg|Item 1
File:SMB NES Box.jpg|Item 1
File:SMB NES Box.jpg|a link to [[Help:Contents]]
File:SMB NES Box.jpg|a link to [[Help:Contents]]
Line 115: Line 171:


==Image maps==
==Image maps==
Image maps are welcome on StrategyWiki. They are images of which certain portions are clickable as links. You can use visual editors such as [http://www.boutell.com/mapedit/ Mapedit] to assist with drawing the shapes, although this free [http://toolserver.org/~dapete/ImageMapEdit/ImageMapEdit.html?en image map editor] is more than sufficient.
Image maps are welcome on StrategyWiki. They are images of which certain portions are clickable as links. You can use visual editors such as [https://www.image-map.net/ Image Map Generator] to assist with drawing the shapes, although this free [https://meta.wikimedia.org/wiki/User:Dapete/ImageMapEdit image map editor] is more than sufficient.


===Syntax description===
===Syntax description===
:''The following comes from [[mw:Extension:ImageMap|ImageMap at MediaWiki.org]]''
:''The following comes from [[mw:Extension:ImageMap|ImageMap at MediaWiki]]''
The content of an <nowiki><imagemap></nowiki> tag consists of blank lines, comments (starting with #) and logical lines. The first logical line specifies the image to be displayed and the size if you're not using its native size. This must be in the same format as an ordinary MediaWiki image link, except without the enclosing <nowiki>[[</nowiki> and <nowiki>]]</nowiki>.  
The content of an <nowiki><imagemap></nowiki> tag consists of blank lines, comments (starting with #) and logical lines. The first logical line specifies the image to be displayed and the size if you're not using its native size. This must be in the same format as an ordinary MediaWiki image link, except without the enclosing <nowiki>[[</nowiki> and <nowiki>]]</nowiki>.  


Further lines are split into tokens, separated by whitespace. The function of each line is determined by the first token in the line. '''All coordinates are according to the full-size image, not the visible image'''.
Further lines are split into tokens, separated by whitespace. The function of each line is determined by the first token in the line. '''All coordinates are according to the full-size image, not the visible image'''.


*'''desc''': Specifies the location of the image description link. May be either <tt>top-right</tt>, <tt>bottom-right</tt>, <tt>bottom-left</tt>, <tt>top-left</tt>, or <tt>none</tt>. This puts a blue "i" icon in the specified corner, linking to the image description page. The default is bottom-right. To hide the description link, set it to <tt>none</tt>.
* '''desc''': Specifies the location of the image description link. May be either <tt>top-right</tt>, <tt>bottom-right</tt>, <tt>bottom-left</tt>, <tt>top-left</tt>, or <tt>none</tt>. This puts a blue "i" icon in the specified corner, linking to the image description page. The default is bottom-right. To hide the description link, set it to <tt>none</tt>.
*'''poly''': A polygon. The coordinates of the vertices are given, followed by a link in square brackets. '''Polygons must be defined before any other form!'''
* '''poly''': A polygon. The coordinates of the vertices are given, followed by a link in square brackets. '''Polygons must be defined before any other form!'''
*'''rect''': A rectangle. The parameters are the coordinates of the top-left and bottom-right corners, followed by a title to link to in square brackets.  
* '''rect''': A rectangle. The parameters are the coordinates of the top-left and bottom-right corners, followed by a title to link to in square brackets.  
*'''circle''': A circle. The first two parameters are the coordinates of the center, the third is the radius. The coordinates are followed by a link in square brackets.
* '''circle''': A circle. The first two parameters are the coordinates of the center, the third is the radius. The coordinates are followed by a link in square brackets.
*'''default''': This gives the default link, where no other regions are specified.  
* '''default''': This gives the default link, where no other regions are specified.  


All coordinates are specified relative to the source image. The image can be scaled using a size in pixels piped after the image source in the first line, in which case the image map coordinates will be automatically scaled as well.  
All coordinates are specified relative to the source image. The image can be scaled using a size in pixels piped after the image source in the first line, in which case the image map coordinates will be automatically scaled as well.  
Line 186: Line 242:
==Other files==
==Other files==
You can link to an external file using the same syntax used for linking to an external web page, however, it is highly recommended that you upload the images to StrategyWiki instead of hotlinking to other sites.
You can link to an external file using the same syntax used for linking to an external web page, however, it is highly recommended that you upload the images to StrategyWiki instead of hotlinking to other sites.
*<code><nowiki>[http://url.for/some/image.png]</nowiki></code>
* <code><nowiki>[https://url.for/some/image.png]</nowiki></code>
Or with different text:
Or with different text:
*<code><nowiki>[http://url.for/some/image.png link text here]</nowiki></code>
* <code><nowiki>[https://url.for/some/image.png link text here]</nowiki></code>


You can also embed images via their direct URLs. To do that, simply insert the URL:
You can also embed images via their direct URLs. To do that, simply insert the URL:
*<code><nowiki>http://url.for/some/image.png</nowiki></code>
* <code><nowiki>https://url.for/some/image.png</nowiki></code>
You can also use an external image as a link:
You can also use an external image as a link:
*<code><nowiki>[http://destination.page/here/ http://image.url/here.png]</nowiki></code>
* <code><nowiki>[https://destination.page/here/ https://image.url/here.png]</nowiki></code>
Note that if you want an image to link to an internal page you will need to use the external form of the link (e.g. http://strategywiki.org/wiki/Main_Page) rather than the internal one (e.g. [[Main Page]]).
Note that if you want an image to link to an internal page you will need to use the external form of the link (e.g. https://strategywiki.org/wiki/Main_Page) rather than the internal one (e.g. [[Main Page]]).


{{Footer Nav|game=StrategyWiki:Guide|prevpage=Links|nextpage=Tables}}
{{Footer Nav|game=StrategyWiki:Guide|prevpage=Links|nextpage=Tables}}

Navigation menu