Template:File link

From the Super Mario Wiki, the Mario encyclopedia
Revision as of 08:51, June 4, 2024 by Porplemontage (talk | contribs) (Porplemontage moved page Template:Media link to Template:File link: This links to the file page, and since it's used for all files (including images) I want to differentiate from audio/video "media files" and media file templates such as Template:Media table. Plus the word "media" is also used for Template:Media type of media and I want to use it in one fewer instance)
Jump to navigationJump to search

This template creates a file page link with Special:UnusedFiles prevention, as well as Special:Upload support if the file doesn't exist.

About

:File: vs. Media:

Both prefixes display a link instead of embedding the file itself, but there are some key differences:

Prefix Sample Provides a file page link Special:UnusedFiles prevention Provides a special link to Special:Upload if a red link has been detected
:File: File:MK8 Electrodrome Alternate Screen.png
File:Aeilsdfilasjdl.png
Check mark.svg X mark.svg X mark.svg
Media: Media:MK8 Electrodrome Alternate Screen.png
Media:Aeilsdfilasjdl.png
X mark.svg Check mark.svg Check mark.svg

Usage

Testing the template for bugs:

Code MediaWiki parsing
{{media link|MK8 Electrodrome Alternate Screen.png}} File:MK8 Electrodrome Alternate Screen.pngMedia:MK8 Electrodrome Alternate Screen.png
{{media link|MK8 Electrodrome Alternate Screen.png|}} File:MK8 Electrodrome Alternate Screen.pngMedia:MK8 Electrodrome Alternate Screen.png
{{media link|MK8 Electrodrome Alternate Screen.png|Test}} TestMedia:MK8 Electrodrome Alternate Screen.png
{{media link||Test}} [[Media:|Test]]
{{media link||}} [[Media:|File:]]
{{media link|}} [[Media:|File:]]
{{media link}} [[Media:{{{1}}}|File:{{{1}}}]]
{{media link|Aeilsdfilasjdl.png}} File:Aeilsdfilasjdl.png
{{media link|Aeilsdfilasjdl.png|}} File:Aeilsdfilasjdl.png
{{media link|Aeilsdfilasjdl.png|Test}} Test