Template:VanillaImage
Template page
More actions
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 |
|---|---|---|
{{VanillaImage|Diamond Sword}}
|
Displays a 32px Diamond Sword icon | |
{{VanillaImage|Iron Pickaxe|size=48}}
|
Displays a 48px Iron Pickaxe icon | |
{{VanillaImage|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 |
{{VanillaImage|Enchanted Golden Apple|alt=Notch Apple}}
|
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=48orsize=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 addsInvicon_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
- Module:VanillaImage - The underlying Scribunto module
- Minecraft Wiki
[view] [edit] [history] [purge]The above documentation is transcluded from Template:VanillaImage/doc.