R

*This documentation is imported from R/doc*
The {{R}} template stands for "Resize", and is a complete substitute to wikilinks, but can be used for externally hosted images. There is one parameter (the first) in which the source url of the image should be placed, 4 other parameters for general image changes like alignment and width, a link parameter and a height parameter.

It should be noted that parameters can be used in any order, with any combinations, as long as it has another function than previously defined parameters. Having a parameter with thumb *and* a parameter with frame won't do anything, and when 2 captions are defined, only the first one will show.

## First parameter

The first parameter has to be defined, and if it is not, the template won't work. The most basic usage of the template is as follows:

{{R|*<the source url of the image>*}} where the url entered is replaced by the source url of the image. For example, this would display:

http://i.imgur.com/t9i70.jpg

As you can see, the image automatically links to the source url of the image. To prevent this from happening, you can leave the link parameter blank. More info about the link parameter is in the #Link parameter section.

## 2nd up to 5th parameter

These 4 parameters can be used to define the width, alignment, whether it is a thumbnail or not and the caption.

### Width

To define the width of the image, simply put a number with "px" behind it in one of the 4 parameters.

would give:
http://i.imgur.com/UduXf.jpg

### Alignment

To align an image to the left, right or center, simply put "left", "right", "centre", or "center" in one of the 4 parameters.

would give:

### Thumbnail

To make the image a thumbnail, either aligned to the right, left or center (cannot be used in a text rule, like normal thumbnails) (default alignment is right), put either frame or thumb in one of the parameters. Note that thumb automatically resizes the image to 180px wide, and frame doesn't resize at default. As opposed to filelinks, when frame is used, the image can still be resized, it just doesn't resize by default.

would give:

### Caption

Anything else that's placed in one of the 4 optional parameters is treated as caption (anything but "thumb", "frame", "left", "right", "centre", "center" or ending with "px"). A caption is only used for a title (the text shown when hovering over the image) when not used as thumbnail, but when used as thumbnail, the caption will also be displayed below the image.

would give:
http://i.imgur.com/36LVV.jpg
and for thumbnailed images:
{{R|*<<the source url of the image>>*|*<thumb>*|*<caption>*}}
would give:

## Height parameter

The height (h) parameter can be used to let images resize by height instead of width, or to let the image stretch. If you want to let the image resize by height instead of width.

would give:
http://i.imgur.com/Wb6Af.png

It should be noted that the width automatically resizes with the height, keeping the dimensions as they originally were, but as soon as one of the 4 optional parameters defines the width, the image will be stretched.

would give:
http://i.imgur.com/ZmJfw.jpg

## Source

* http://callofduty.wikia.com/wiki/Template:R/doc