Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:VanillaImage/doc

Template page
Revision as of 05:38, 16 December 2025 by Mnooseman (talk | contribs) (Created page with "== Usage == This template displays inventory icons from [https://minecraft.wiki Minecraft Wiki]. It automatically adds the <code>Invicon_</code> prefix to item names. === Basic syntax === <pre> {{MCImage|item name}} </pre> === Examples === {| class="wikitable" ! Code !! Result !! Description |- | <code><nowiki>{{MCImage|Diamond Sword}}</nowiki></code> | {{MCImage|Diamond Sword}} | Displays a 32px Diamond Sword icon |- | <code><nowiki>{{MCImage|Iron Pickaxe|size=48}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)

Usage

This template displays inventory icons from Minecraft Wiki. It automatically adds the Invicon_ prefix to item names.

Basic syntax

{{MCImage|item name}}

Examples

Code Result Description
{{MCImage|Diamond Sword}} Template:MCImage Displays a 32px Diamond Sword icon
{{MCImage|Iron Pickaxe|size=48}} Template:MCImage Displays a 48px Iron Pickaxe icon
{{MCImage|Golden Apple|size=64|link=Golden Apple}} Template:MCImage Displays a 64px Golden Apple icon linked to the Golden Apple page
{{MCImage|Enchanted Golden Apple|alt=Notch Apple}} Template:MCImage Displays with custom alt text for accessibility

Parameters

1 (required)
The in-game item name. Spaces will be converted to underscores automatically. The Invicon_ prefix is added automatically.
size
Image size in pixels. Default is 32. Can be specified with or without "px" (e.g., size=48 or size=48px).
link
Internal wiki page to link the image to. If not specified, the image is not linked.
alt
Alt text for the image (for accessibility). Defaults to the item name if not specified.
prefix
Controls the filename prefix behavior.
  • auto (default) - Automatically adds Invicon_ prefix if not already present
  • "" (empty) - Uses the exact filename provided without adding any prefix
  • Any other value - Uses that value as the prefix instead of Invicon_

Advanced usage

Using full filename

If you need to specify the complete filename (without the automatic Invicon_ prefix):

{{MCImage|Invicon_Diamond_Sword|prefix=}}

Custom prefix

If you need a different prefix:

{{MCImage|Diamond_Sword|prefix=ItemSprite_}}

Technical details

This template uses Module:VanillaImage to fetch inventory icon images from Minecraft Wiki. Images are loaded via the Special:Redirect/file feature.

Image source

All images are sourced from Minecraft Wiki and are used with permission. The images remain the property of Mojang Studios/Microsoft.

See also