Difference between revisions of "Help:Images"

From Coastal Wiki
Jump to: navigation, search
(linking to a wiki page from an image)
(Custom layout)
Line 49: Line 49:
 
The following code
 
The following code
 
<pre>  
 
<pre>  
<div style="float:right;width:250px;margin:0.4em 1em 0.4em 0.5em">[[Image:Figure_1.jpg|caption|right|250px|]]
+
{{Image
<div style="text-align: right;font-size:80%">Foto: Ignacio Bárbara</div></div>
+
|position = right
 +
|margin = 5px 5px 5px 5px
 +
|width = 250
 +
|wikiimage = Figure_1.jpg
 +
|captionposition = right
 +
|fontsize = 80
 +
|caption = Foto: Ignacio Bárbara
 +
}}
 
</pre>  
 
</pre>  
shows the same but with a small caption:
+
Parameters:
<div style="float:right;width:250px;margin:0.4em 1em 0.4em 0.5em">[[Image:Figure_1.jpg|caption|right|250px|]]
+
* "{{Image" calls up the template 
<div style="text-align: right;font-size:80%">Foto: Ignacio Bárbara</div></div>
+
* Position: "left" or "right"
 +
* margin: determines the margin between your image and the text. The first value is the margin between the image and the text (or images) above it. The second to the right, the third below and the fourth value the margin between the image and the text (or images) to the left of it.
 +
* width: insert the width in px
 +
* wikiimage : provide the name of the wikipage storing the image (not the complete url)
 +
* captionposition: left, right or center
 +
* fontsize: in percentage relative to the normal font-size
 +
* caption: the caption displayed below the image
 +
 
 +
which shows the same but with a small caption:
 +
{{Image
 +
|position = right
 +
|margin = 5px 5px 5px 5px
 +
|width = 250
 +
|wikiimage = Figure_1.jpg
 +
|captionposition = right
 +
|fontsize = 80
 +
|caption = Foto: Ignacio Bárbara
  
 
<br style="clear:both;"/>
 
<br style="clear:both;"/>
  
If needed you can personalize this code further
 
* float:left will position the image left. You can change to left or 
 
* the width determines the width of the image
 
* margin(you can change the em in px if preferred) determines the margin between your image and the text. The first value is the margin between the image and the text (or images) above it. The second to the right, the third below and the fourth value the margin between the image and the text (or images) to the left of it.
 
* text-align positions caption text
 
* font size can be provided in px if preferred
 
  
 
If you wish to position just the single image in the center of the page you can use the following code:
 
If you wish to position just the single image in the center of the page you can use the following code:
<pre>  
+
<pre>
<div style="width:250px;margin:0.4em auto 0.4em auto">[[Image:Figure_1.jpg|caption|right|250px|]]
+
{{Image
<div style="text-align: right;font-size:80%">Foto: Ignacio Bárbara</div></div>
+
|margin = 0.4em auto 0.4em auto
 +
|width = 250
 +
|source= http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg
 +
|captionposition = center
 +
|fontsize = 80
 +
|caption = Foto: Ignacio Bárbara
 +
}}
 
</pre>
 
</pre>
  
<div style="width:250px;margin:0.4em auto 0.4em auto">[[Image:Figure_1.jpg|caption|right|250px|]]
+
which renders
<div style="text-align: right;font-size:80%">Foto: Ignacio Bárbara</div></div>
+
{{Image
 
+
|margin = 0.4em auto 0.4em auto
 +
|width = 250
 +
|source= http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg
 +
|captionposition = center
 +
|fontsize = 80
 +
|caption = Foto: Ignacio Bárbara
 +
}}
  
 
=== linking to a wiki page from an image ===
 
=== linking to a wiki page from an image ===

Revision as of 09:38, 3 August 2016

The following page describes how to include images in the Coastal Wiki.

There are 3 options available to show images in the wiki

Link to an image uploaded directly in the wiki

When you upload an image to the wiki using the upload file tool please make sure you:

  • do not upload any copyright protected materials
  • mention the author credits both in the file page where the image is stored as on the pages where you include the image.
  • if useful you can provide a description of the image on its file page

using the thumbnail tool

Inserting an image (image command):

 [[Image:filename.jpg|thumb|right|250px|Figure 1: CaptionText]]

this shows

Figure 1: CaptionText


This means that a thumbnail of the image is inserted at righthand side, with a size of 250px, with a caption. Instead of placing images at righthand side of the text it is also possible to place them at the lefthand side (“left”) in the centre (“centre”). It is also possible to align no text to the pictures by using “none”.

 [[Image:filename.jpg|thumb|left|250px|Figure 1]]
 [[Image:filename.jpg|thumb|none|250px|Figure 2]]

When you want to align two images horizontally, align the first image “left” and the other image “none”. To prevent subsequent text from being places alongside the images, include the line

 <br style="clear:both;"/> 

If you want to align more than two images, it may be useful to place them in a table. To create a table with more than two pictures, use:

 {|
 | [[Image:File.jpg|thumb|250px|Figure 1]]
 | [[Image:File.jpg|thumb|250px|Figure 2]]
 | [[Image:File.jpg|thumb|250px|Figure 3]]
 |}


Custom layout

In some cases the tumbnails are not compatible with the layout you envision for your page. You do not need to use the tumbnail and can use caption instead

e.g.

 [[Image:Figure_1.jpg|caption|right|250px|]] 

renders

Figure 1.jpg


You may which to add a description and or author credits. For this purpose a few custom options were developed The following code

 
{{Image
|position = right
|margin = 5px 5px 5px 5px
|width = 250
|wikiimage = Figure_1.jpg
|captionposition = right
|fontsize = 80
|caption = Foto: Ignacio Bárbara
}}

Parameters:

  • "{{Image" calls up the template
  • Position: "left" or "right"
  • margin: determines the margin between your image and the text. The first value is the margin between the image and the text (or images) above it. The second to the right, the third below and the fourth value the margin between the image and the text (or images) to the left of it.
  • width: insert the width in px
  • wikiimage : provide the name of the wikipage storing the image (not the complete url)
  • captionposition: left, right or center
  • fontsize: in percentage relative to the normal font-size
  • caption: the caption displayed below the image

which shows the same but with a small caption: {{Image |position = right |margin = 5px 5px 5px 5px |width = 250 |wikiimage = Figure_1.jpg |captionposition = right |fontsize = 80 |caption = Foto: Ignacio Bárbara



If you wish to position just the single image in the center of the page you can use the following code:

{{Image
|margin = 0.4em auto 0.4em auto
|width = 250
|source= http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg
|captionposition = center
|fontsize = 80
|caption = Foto: Ignacio Bárbara
}}

which renders

Foto: Ignacio Bárbara


linking to a wiki page from an image

Use the code:

[[Image:Logonietinheemsesoorten.jpg|caption|150px|center|naar de lijst|
link=Lijst_niet-inheemse_soorten_Belgisch_deel_Noordzee_en_aanpalende_estuaria]]
  • naar de lijst = hover text which apears above the image
  • link = provides a link to a wiki page

Include an external image

If you simply provide a link to an image, it will displayed as an image. However it's preferred to use the following format when you wish to insert external image to your wiki page. Using external links to images has the benefit that they do not need to be stored in the wiki. However if the link to the image no longer resolves at some point the wiki page will display a dead link. So you should only use use this for images for which you know they will always stay available through this link.

<img title="insert text" src="http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg" style="width: 350px"/>

shows


  • where the link provided after src refers to the image.
  • you have a width component
  • the title component is responsible for the text you see when you hover with your mouse over the image.

If you need a caption you can use the same code as demonstrated above.

 <div style="float:right;width:350px;margin:0.4em 1em 0.4em 0.5em"> 
<img title="insert text" src="http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg" style="width: 350px"/> 
<div style="text-align: right;font-size:80%">Foto: Ignacio Bárbara</div></div>

shows:

Foto: Ignacio Bárbara


You can use this to provide links to the VLIZ fotogalerij using the link:

http://images.vliz.be/resized/11482.jpg

where the number (in this case 11482) refers to the id of the image.

Include image from the VLIZ fotogalerij

It's possible to include images or movies directly from the VLIZ fotogalerij. The base code for this is:

 <vliz_photo_gallery pic="42836" share="1"></vliz_photo_gallery> 

Where

  • pic refers to the image id
  • "share" is default enabled if set to 0 no social share buttons will be added

Westerschelde
Westerschelde
Description Hooge Platen Westerschelde (2002.03.11) Author Decleer, Misjel JPG file - 674.83 kB - 4 203 x 2 870 pixels added on 2011-08-0424 335 viewsImage owner Vlaams Instituut voor de Zee (VLIZ) Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License