<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3AClean_image%2Fdoc</id>
	<title>Template:Clean image/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3AClean_image%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Clean_image/doc&amp;action=history"/>
	<updated>2026-04-30T12:05:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Template:Clean_image/doc&amp;diff=34118&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;{{Documentation}} {{invokes|clean image}}  Cleans and formats an input image. This removes the following things if present: * &lt;code&gt;&lt;nowiki&gt;File:&lt;/nowiki&gt;&lt;/code&gt; * &lt;code&gt;&lt;nowiki&gt;&lt;/nowiki&gt;&lt;/code&gt; * &lt;code&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/code&gt; and &lt;code&gt;&lt;nowiki&gt;{{!}}&lt;/nowiki&gt;&lt;/code&gt;, and everything following the first of these until the end  Then it re-packages the image into a new file container, with specified height, width, and link.  ==Usage== &lt;pre&gt;{{clean image |file = wikitex...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Clean_image/doc&amp;diff=34118&amp;oldid=prev"/>
		<updated>2024-10-15T22:13:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation}} {{invokes|clean image}}  Cleans and formats an input image. This removes the following things if present: * &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[File:&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; * &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; * &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and everything following the first of these until the end  Then it re-packages the image into a new file container, with specified height, width, and link.  ==Usage== &amp;lt;pre&amp;gt;{{clean image |file = wikitex...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation}}&lt;br /&gt;
{{invokes|clean image}}&lt;br /&gt;
&lt;br /&gt;
Cleans and formats an input image. This removes the following things if present:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[File:&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, and everything following the first of these until the end&lt;br /&gt;
&lt;br /&gt;
Then it re-packages the image into a new file container, with specified height, width, and link.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&amp;lt;pre&amp;gt;{{clean image&lt;br /&gt;
|file = wikitext to be cleaned; this should usually be a template parameter (e.g. |file={{{image}}}); required&lt;br /&gt;
|width = width of image; no default; exclude &amp;#039;px&amp;#039;&lt;br /&gt;
|height = height of image; no default; exclude &amp;#039;px&amp;#039;; can be combined with width&lt;br /&gt;
|link = link to apply to image; no default (will link to file page); setting to no will suppress normal link&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
To be practical the results will be as if &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|image=[[File:Weird gloop.png|100px|link=abyssal whip]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as the input.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Example&lt;br /&gt;
! Code&lt;br /&gt;
! Result&lt;br /&gt;
! Notes&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Just clean&lt;br /&gt;
| &amp;lt;pre&amp;gt;{{clean image|file={{{image}}}}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
| {{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]}}&lt;br /&gt;
| Should result in&lt;br /&gt;
&amp;lt;pre&amp;gt;[[File:{FILENAME}]]&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that it links to the file page as a normal image does.&lt;br /&gt;
|-&lt;br /&gt;
| Clean + width&lt;br /&gt;
| &amp;lt;pre&amp;gt;{{clean image|file={{{image}}}|width=50}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
| {{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]|width=50}}&lt;br /&gt;
| Should result in&lt;br /&gt;
&amp;lt;pre&amp;gt;[[File:{FILENAME}|{WIDTH}px]]&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Clean + height&lt;br /&gt;
| &amp;lt;pre&amp;gt;{{clean image|file={{{image}}}|height=20}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
| {{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]|height=20}}&lt;br /&gt;
| Should result in&lt;br /&gt;
&amp;lt;pre&amp;gt;[[File:{FILENAME}|x{HEIGHT}px]]&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remember that height parameters on images are maximum height limits and won&amp;#039;t make an image bigger (without a width set).&lt;br /&gt;
|-&lt;br /&gt;
| Clean + width + height&lt;br /&gt;
| &amp;lt;pre&amp;gt;{{clean image|file={{{image}}}|width=44|height=20}}&lt;br /&gt;
{{clean image|file={{{image}}}|width=11|height=50}}&lt;br /&gt;
{{clean image|file={{{image}}}|width=66|height=66}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&amp;lt;poem&amp;gt;{{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]|width=44|height=20}}&lt;br /&gt;
{{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]|width=11|height=50}}&lt;br /&gt;
{{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]|width=66|height=60}}&amp;lt;/poem&amp;gt;&lt;br /&gt;
| Should result in&lt;br /&gt;
&amp;lt;pre&amp;gt;[[File:{FILENAME}|{WIDTH}x{HEIGHT}px]]&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remember that height is still a maximum limit here. The size will be {WIDTH}px wide unless this makes the height more than {HEIGHT}px, in which case it is sized down to {HEIGHT}px tall. Aspect ratio is always kept.&lt;br /&gt;
&lt;br /&gt;
Weird gloop.png is 22px wide and 30px tall. In the first use it is trying to resize to twice as wide but the maximum height of 20px forces it to resize down to 15x20px. The second use it successfully resizes down to half as wide, 11x15px. The third use is trying to go thrice as wide but the height limit only allows it to go twice as tall, so is 44x60px.&lt;br /&gt;
|-&lt;br /&gt;
| Clean + link&lt;br /&gt;
| &amp;lt;pre&amp;gt;{{clean image|file={{{image}}}|link=Weird gloop}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
| {{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]|link=Weird gloop}}&lt;br /&gt;
| Should result in&lt;br /&gt;
&amp;lt;pre&amp;gt;[[File:{FILENAME}|link={LINK}]]&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Clean + link suppress&lt;br /&gt;
| &amp;lt;pre&amp;gt;{{clean image|file={{{image}}}|link=no}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
| {{clean image|file=[[File:Weird gloop.png|100px|link=abyssal whip]]|link=no}}&lt;br /&gt;
| Should result in&lt;br /&gt;
&amp;lt;pre&amp;gt;[[File:{FILENAME}|link=]]&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Formatting templates]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>