Adding Images to your Article: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(cat at the bottom)
m (update)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
You can upload images directly to DarkWiki by using this page: [[Special:Upload]]. Once uploaded, include the image in a page using a link in the form <nowiki>[[Image:File.jpg]]</nowiki>
You can upload images directly to DarkWiki by using this page: [[Special:Upload]]. Once uploaded, include the image in a page using a link in the form <nowiki>[[Image:File.jpg]]</nowiki>


Note: '''This is the prefered method of storing images!'''
{{infobox|bg=#ff9070|text='''Note''': External hosting should not be used with the wiki, as external hosts tend to disappear, either temporarily or permanently, leaving the wiki articles without images. And since an image is worth 1000 words...}}


== Alternative: External Hosting ==


'''Note''': This alternative should not be used with the wiki, as external hosts tend to disappear, either temporarily or permanently, leaving the wiki articles without images. And since an image is worth 1000 words...
== Example image ==
You will have to use some external hosting service like [http://imageshack.us ImageShack]. Once you know the URL of your linked image, copy and paste it into your text like this:


<nowiki>http://modetwo.net/darkmod/style_images/darkimg/darkmod-logo.jpg</nowiki>
[[Image:Tdm wiki logo.png|This is the text displayed]]


The Wiki will recognize this as a link to an image and will automatically insert this image into your article at full size:


http://modetwo.net/darkmod/style_images/darkimg/darkmod-logo.jpg
== Floating images ==


== Adding ImageShack-Images to Wiki-Articles ==
Some example: [[Image:Tdm wiki logo.png|Floating right|right]]
Once you upload your image to ImageShack, a page containing a bunch of links appears. Copy the one named as "'''direct link to image'''" and paste it here like this:
[[Image:Tdm wiki logo.png|Floating left|left]]
{{clear}}


<nowiki>http://img153.imageshack.us/img153/9927/shot00006xs8.jpg</nowiki>
See [[Handling_Line_Breaks#Floating elements|here]] for how to achieve that effect.


This will insert the image at full size into your article.
== Images with a text below ==


== Adding ImageShack-Images with Thumbnails ==
Add '''thumb''' to the image link and use <nowiki>{{clear}}</nowiki> afterwards:
Inserting large 1024x768 screenshots can make the reading of your article hard (and increases bandwidth consumption), so it's cleaner to create a clickable thumbnail that links to the full size image.


As above, copy and paste the link named "'''direct link to image'''" into your text, this time in single brackets:
<nowiki>[[Image:Tdm wiki logo.png|The Dark Mod logo|thumb]] {{clear}}</nowiki>


<nowiki>[http://img153.imageshack.us/img153/9927/shot00006xs8.jpg]</nowiki>
[[Image:Tdm wiki logo.png|The Dark Mod logo|thumb]] {{clear}}


This will create a link to the full sized image. Now insert the link description, which in our case is the thumbnail of this image.
== Resizing images ==
For Firefox-Users just right-click on the actual preview thumbnail that ImageShack is showing you after upload and choose "Copy Image Location" and paste it right before the closing bracket like this (and after the space):


<nowiki>[http://img153.imageshack.us/img153/9927/shot00006xs8.jpg http://img153.imageshack.us/img153/9927/shot00006xs8.th.jpg]</nowiki>
You can ask the wiki to resize an image to any width by add <nowiki>|XXXpx</nowiki> in the image link, where XXX is the number of pixels, f.i. 220. Make sure that it is not too big or small.


Note the space between the two links that is necessary to tell DarkWiki that these are two seperate strings. Now the thumbnail will be used as description for this external link.
[[Image:Trans_0013.jpg|320px|This image is scaled to 320 pixel]] [[Image:Trans_0013.jpg|240px|This image is scaled to 240 pixel]] [[Image:Trans_0013.jpg|160px|This image is scaled to 160 pixel]]


Note: If you look closely you'll notice that the only difference between these two links is the thumbnail using '''.th.jpg''' instead of '''.jpg'''. As long as ImageShack doesn't change this format, you can also duplicate the link to the full image and insert the '''.th''' manually, thus saving the "Copy Image Location" part.


The result will look like this:
{{tutorial-wiki|sort=Images}}
 
[http://img153.imageshack.us/img153/9927/shot00006xs8.jpg http://img153.imageshack.us/img153/9927/shot00006xs8.th.jpg]
 
{{tutorial-wiki}}

Latest revision as of 13:09, 23 March 2012

Upload the Image to DarkWiki

You can upload images directly to DarkWiki by using this page: Special:Upload. Once uploaded, include the image in a page using a link in the form [[Image:File.jpg]]

Note: External hosting should not be used with the wiki, as external hosts tend to disappear, either temporarily or permanently, leaving the wiki articles without images. And since an image is worth 1000 words...


Example image

This is the text displayed


Floating images

Some example:

Floating right
Floating left

See here for how to achieve that effect.

Images with a text below

Add thumb to the image link and use {{clear}} afterwards:

[[Image:Tdm wiki logo.png|The Dark Mod logo|thumb]] {{clear}}

The Dark Mod logo

Resizing images

You can ask the wiki to resize an image to any width by add |XXXpx in the image link, where XXX is the number of pixels, f.i. 220. Make sure that it is not too big or small.

This image is scaled to 320 pixel This image is scaled to 240 pixel This image is scaled to 160 pixel