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: Difference between revisions

Template page
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}}..."
 
Line 15: Line 15:
|-
|-
| <code><nowiki>{{MCImage|Diamond Sword}}</nowiki></code>
| <code><nowiki>{{MCImage|Diamond Sword}}</nowiki></code>
| {{MCImage|Diamond Sword}}
| {{VanillaImage|Diamond Sword}}
| Displays a 32px Diamond Sword icon
| Displays a 32px Diamond Sword icon
|-
|-
| <code><nowiki>{{MCImage|Iron Pickaxe|size=48}}</nowiki></code>
| <code><nowiki>{{MCImage|Iron Pickaxe|size=48}}</nowiki></code>
| {{MCImage|Iron Pickaxe|size=48}}
| {{VanillaImage|Iron Pickaxe|size=48}}
| Displays a 48px Iron Pickaxe icon
| Displays a 48px Iron Pickaxe icon
|-
|-
| <code><nowiki>{{MCImage|Golden Apple|size=64|link=Golden Apple}}</nowiki></code>
| <code><nowiki>{{MCImage|Golden Apple|size=64|link=Golden Apple}}</nowiki></code>
| {{MCImage|Golden Apple|size=64|link=Golden Apple}}
| {{VanillaImage|Golden Apple|size=64|link=Golden Apple}}
| Displays a 64px Golden Apple icon linked to the Golden Apple page
| Displays a 64px Golden Apple icon linked to the Golden Apple page
|-
|-
| <code><nowiki>{{MCImage|Enchanted Golden Apple|alt=Notch Apple}}</nowiki></code>
| <code><nowiki>{{MCImage|Enchanted Golden Apple|alt=Notch Apple}}</nowiki></code>
| {{MCImage|Enchanted Golden Apple|alt=Notch Apple}}
| {{VanillaImage|Enchanted Golden Apple|alt=Notch Apple}}
| Displays with custom alt text for accessibility
| Displays with custom alt text for accessibility
|}
|}

Revision as of 05:39, 16 December 2025

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}}

32px

Displays a 32px Diamond Sword icon
{{MCImage|Iron Pickaxe|size=48}}

48px

Displays a 48px Iron Pickaxe icon
{{MCImage|Golden Apple|size=64|link=Golden Apple}}

[https://minecraft.wiki/w/Special:Redirect/file/Invicon_Golden_Apple.png 64px]

Displays a 64px Golden Apple icon linked to the Golden Apple page
{{MCImage|Enchanted Golden Apple|alt=Notch Apple}}

32px

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