Guideline:Images

From Prince Vault
Jump to navigationJump to search

Guideline:Images

Basics

From: Mediawiki: Images Guideline

  • Resizing option:
{width}px — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
x{height}px — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
{width}x{height}px — Resizes the image to fit within the given width and height in pixels;
upright — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images whose height is larger than width).
Examples:
[[File:LiveOutLoudTourPoster2.png|100px]]
[[File:LiveOutLoudTourPoster2.png|x100px]]
Note that the image will always retain its aspect ratio, and can only be reduced (not increased) in size unless it's in a scalable media type (bitmap images cannot be scaled up). The default maximum size depends on the format and the internal image dimensions (according to its media type).
  • Alignment options:
Horizontal alignment option:
left, right, center, none;

Controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).

Vertical alignment option:
baseline, sub, super, top, text-top, middle, bottom, text-bottom;

Controls the vertical alignment of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is middle).

Useful tags

Use the following tags to align images:

  • top

[[File:LiveOutLoudTourPoster2.png|top|100px]] [[File:LiveOutLoudTourPoster2.png|top|150px]]

  • bottom

[[File:LiveOutLoudTourPoster2.png|bottom|100px]] [[File:LiveOutLoudTourPoster2.png|bottom|150px]]

  • middle

[[File:LiveOutLoudTourPoster2.png|middle|100px]] [[File:LiveOutLoudTourPoster2.png|middle|150px]]

Galleries

MediaWiki in-built Gallery

Use the following tags to built a mediawiki gallery:

The <gallery> </gallery> tags insert a gallery in a page;
The attribues widths=80px heights=80px define the height and width of the gallery images;
The attribute perrow=8 defines how many images fit in one line;
Example:
<gallery widths=80px heights=80px perrow=8>
File:Come2myhouse_album.jpg
File:Musicology_album.jpg
</gallery>

PrinceVault Galleries

On This Day

Use the following templates to built a gallery in an On This Day page:

Template:Gallery use {{Gallery|1= 'content' }} to create a gallery;
Template:Gimg use {{Gimg|1= 'file name' |2= 'link' }} to add a line.
Template:GimgB use {{Gimg|1= 'file name' |2= 'link' }} to add a line w/border
Example:
{{Gallery|1=
{{Gimg|1=Come2myhouse_album.jpg|2=[[Album: Come 2 My House]]}}
{{Gimg|1=Musicology_album.jpg|2=[[Album: Musicology]]}}
}}
  • Complete code
Caption
  • Template code:

Live Recordings

Use the following templates to built a gallery in an On This Day page:

Template:GalleryL use {{GalleryL|1= 'content' }} to create a gallery;
Template:Limg use {{Limg|1= 'file name'}} to add a line.
Template:LimgB use {{Limg|1= 'file name'}} to add a line with border.
Template:GCap use {{GCap|1= 'text' }} to add a bottom caption to the gallery.
Example:
{{GalleryL|1=
{{Limg|1=Come2myhouse_album.jpg}}
{{Limg|1=Musicology_album.jpg}}
{{GCap|1=Caption}}
}}
  • Complete code with x60px height
Click to enlarge
Click to enlarge
Click to enlarge
Click to enlarge
Click to enlarge
Alternate tickets and newspaper advertisements for this show
  • Live recordings gallery template with x60px height
Click to enlarge
Click to enlarge
Click to enlarge
Click to enlarge
Click to enlarge
Alternate ticket and newspaper advertisements for this show, VIP coupon for a drink for this event