Template:Image

From Dolphin Emulator Wiki
Jump to navigation Jump to search
[edit] [purge] Template documentation

This template provides a simplified way to use thumbnails of images uploaded to this wiki. It automatically uses the standard thumbnail size and position used on this wiki

Usage

The Image template should be called in the following way:

  • {{Image|<filename>|<description>|<new row?>}}

where

  • Filename is the name of the file (with extension) uploaded to the wiki (like "myfile.png")
  • Description (optional) is the caption for the thumbnail.
  • new row? (optional) should always be br when used. This parameter tell the template if it should create a new row or not.

Examples

  • Specifying filename and description. Since we are embedding only one image, we should add the br tag to the 3rd parameter. In this example, {{Image|Super Smash Bros. Melee-Corrupt Stats.jpg|Corrupt|br}} will produce this:
  • Specifying only filename shows only the enlarge button. We are embedding only one image, so we should add the br tag to the 3rd parameter. In this example, {{Image|Super Smash Bros. Melee-Non-Corrupt Stats.jpg||br}} will produce this:
  • Long description text will be truncated if it's wider than the image box. {{Image|Super Smash Bros. Brawl-Classic Results.png|Long description text will be truncated if it's wider than the image box.|br}} will produce this:

Notes

  • If you embed images with different aspect ratio, the thumbnail height may vary and may cause issues with floating elements. So, you can override the default width (used to generate the thumbnail) by adding |width=<number of pixels> somewhere when calling the template. This parameter can be included in any position, but our convention is adding this parameter as the last one when calling the template.
Recommendation: adding as the last parameter:
{{Image|Super Smash Bros. Melee-Non-Corrupt Stats.jpg||br|width=500}}
Avoid this: adding anywhere else:
{{Image|width=500|Super Smash Bros. Melee-Corrupt Stats.jpg|Corrupt|br}}
  • The 3rd parameter only accept the br tag. If you include any other tag, nothing will happen.
  • Using multiple calls will make the thumbnails be side-by-side (the last image should always include the br tag to the 3rd parameter):
  • When you need one image in each row, you should add the br tag to the 3rd parameter of all images, not just the last:
  • If you use this template and forget to add the br tag to the 3rd parameter after calling the last image, you'll get something weird, like this topic!