Help:Infobox picture

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

If an article already has an infobox at the top right, then the usual place for the article's first picture is within the infobox. This page describes how to add that picture. Confusingly, the proper syntax to do this varies from one infobox to another.

This page assumes that the picture has already been uploaded to Wikipedia or to Wikimedia Commons; see Wikipedia:Uploading images.

Using three or four parameters[edit]

In these infoboxes, the image information is split up into three or four different parameters. This is the syntax used by {{Infobox person}}, {{Infobox officeholder}}, {{Infobox sportsperson}} and others. Here are the image parameters for {{Infobox person}}:

{{Infobox person
| image                     = 
| image_size                = 
| alt                       = 
| caption                   = 
}}
  • image is the name of the image, abc.jpg, xpz.png, 123.gif, etc. Do not include the File: or Image: prefix, do not enclose the name in [[brackets]], but do remember to include the filename extension.
  • image_size should normally be left blank, so that the size defaults to the size set in a user's preferences.
  • alt should be set to a description of the image for visually impaired readers. See WP:ALT. Do not use this for another copy of the caption or of the article title, as the reader will already be aware of these.
  • caption, if set, displays just below the image. Remember that the person's name is typically displayed just above the image anyway, so only include a caption if it has something extra to say. It may be helpful to include the date or place of the photo.

Example[edit]

Jimmy Wales
Jimmy Wales Fundraiser Appeal edit.jpg
Wales in December 2008
{{Infobox person
|name=Jimmy Wales
|image=Jimmy Wales Fundraiser Appeal edit.jpg
|caption=Wales in December 2008
}}

A real example would have other parameters as well.

Variations[edit]

Some infoboxes use a syntax similar to this, but with different names for the parameters. For example, {{Infobox album}} uses "Cover" instead of "image" and "Caption" instead of "caption".

Using one or two parameters[edit]

In these infoboxes, the image information is combined into only one or two parameters. This is the syntax used by {{Infobox football club}}, {{Infobox military conflict}} and others. Here are the image parameters for {{Infobox football club}}:

{{Infobox football club
| image                     =
| caption                   = 
}}
  • image is a complete image placement specification as described in the Picture tutorial or at Wikipedia:Extended image syntax. The size should typically be set to 200px, and the image should be centred. Alt text should be included for visually impaired readers.
  • caption is displayed below the image.

Example[edit]

Infobox Rovers
A white football with black pentagons
The logo introduced in 2006
{{Infobox football club
|clubname    = Infobox Rovers
|image       = [[File:Football.svg|200px|center|alt=A white football]]
|caption     = The logo introduced in 2006
}}

Troubleshooting[edit]

I can't work out which set of parameters to use[edit]

When you edit the article, you should be able to find the text "{{Infobox" somewhere near the top. That line, without the pair of curly brackets, is the name of the infobox (If there's a vertical bar "|", then stop before that).

If you've found "Infobox connector", as an example, then type "Template:Infobox connector" into the Wikipedia search box to display the template definition and documentation.

The template documentation is unclear or missing[edit]

It happens. When you are on the template definition page, select "What links here" from within the Toolbox section on the left-hand side. This displays a list of articles that use the same infobox; some of these may help you work out what to do.

My image is displayed, but with extra square brackets and other nonsense[edit]

This typically happens when "image = [[File:.....]]" is used within an infobox that expects "image = just the name".

My image is displayed, but is inside an extra frame[edit]

Example chef
William Orpen Le Chef de l'Hôtel Chatham, Paris.jpg
A typical result from this kind of error

This occurs when the "thumb" keyword is included in the file specification.

{{Infobox person
|name    = Example chef
|image   = [[File:William Orpen Le Chef de l'Hôtel Chatham, Paris.jpg|200px|thumb|center]] <!-- Error -->
|caption = A typical result from this kind of error
}}

I'm seeing the image name as plain black text[edit]

This may be because you have used the "image = just the name" syntax within an infobox that expects "image = [[File:.....]]".

My edits to a parameter are ignored[edit]

This could be a sign that the parameter name is not one of those recognized by the infobox that you are using. You should also check that the parameter is not being specified more than once, as only the last mention of a parameter has any effect.

I'm still stuck[edit]

Ask a question at the Wikipedia:Help desk, including the names of the article and the image.

See also[edit]