Template:Image exists/doc

From SlyMods
Revision as of 15:51, 26 September 2023 by TheOnlyZac (talk | contribs) (Added TCRF attribution)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Given an image, it will either show that image if it exists or a placeholder that links to Special:Upload with the filename pre-set. After uploading an image with the matching name, the image will immediateloy display the new image.

Usage

{{Image exists
| file    = filename.png
| width   = 256px
| caption = Caption text
| mcat    = Articles with missing images
}}
  • file - The name of the image, not including the File: prefix.
  • width - width of the image (note that the placeholder will always be default size)
  • caption - Caption for the image
  • mcat - The category to place the page into if the file does not exist.

Examples

{{Image exists|file=ITM anticrack firewall.png|width=360px}}


{{Image exists|file=This image does not exist.png}}

Click here to upload a new image.Dummy link

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for Image exists

Checks if an image exists, and either displays the image (if it exists) or a placeholder (if it doesn't).

Template parameters

ParameterDescriptionTypeStatus
filefile

The file name of the image

Filerequired
captioncaption

The caption for the image

Stringoptional
widthwidth

The width of the image

Unknownoptional
category if missingmcat

The category to add the page to if the file does not exist

Default
Articles with missing images
Example
Articles with missing images
Page nameoptional

Redirects

The following templates redirect to this template:


TCRF logo

This template uses material from the The Cutting Room Floor template Template:Imageexists, which is released under the Commons Attribution-ShareAlike 3.0 Unported license (view authors).