Wikitravel:如何加入图片

来自Wikitravel
跳转到: 导航搜索

目录

Purple question mark.png 本页的方针或指引是直接翻译自维客旅行英语版,全部或部份内容可能尚未在中文版本取得共识,仅供参考。
请参阅本页的讨论页旅行者茶馆的议题内容。

Articles in Wikitravel can be greatly enhanced with the strategic addition of illustrative images. This article describes how to add images to a page. It assumes that you know:

[编辑] Shared vs local

No extra work is needed to use images on Wikitravel Shared, as the software will automatically check both the Shared and the local image repositories. Note that if the same filename exists on both the local site and the Shared site, the local image has precedence.

[编辑] Thumbnails

Sample thumbnail

Please use thumbnails unless you have a good reason not to. The standard recipe for a thumbnail is as follows:

Thumbnail 
[[Image:filename of image|thumb|description of image]]

This will produce a right-aligned thumbnail with a description below; the image will expand to full size if clicked on. For example, the thumbnail on the right uses Image:Saddleback Pier.JPG from Shared, and it's created like this:

[[Image:Saddleback Pier.JPG|thumb|Sample thumbnail]]

[编辑] Alignment

Some other formatting possibilities are:

Simple interpolation of images into text 
[[Image:filename of image|description of image]]
Centered image 
[[Image:filename of image|center|description of image]]
Left-aligned image 
[[Image:filename of image|left|description of image]]
Right-aligned image 
[[Image:filename of image|right|description of image]]

Providing a description of the image is useful for low-resolution computers, where the image may not be rendered, and for accessibility for disabled Wikitravel users.

[编辑] Frame and Caption

You can also give a frame and a caption text to an image by

Simple frame and caption text 
[[Image:filename of image|frame|description of image]]
Left-aligned frame 
[[Image:filename of image|frame|left|description of image]]
Image without a frame 
[[Image:filename of image|noframe]]

Framing a picture in this manner will default the picture to its original size.

[编辑] Sizing

If you want to specify an exact image size (width) which is not the same as the original, please select a factor of the original. For example, if the original is 800 pixels wide, 400 (1:2), 267 (1:3) or 200 (1:4) will scale nicely; for 640, try 320 (1:2) or 160 (1:4). This is particularly important for images containing small text, such as maps. You do not need to specify the height of the image, as the size will automatically scale to match the width you have entered.

Exact image width in pixels 
[[Image:filename of image|sizepx|description of image]]
Exact thumbnail width in pixels 
[[Image:filename of image|thumb|sizepx|description of image]]

Note that you must add the letters "px" after the image size. Recommended maximum sizes are:

  • 250px for normal image thumbnails
  • 400px for the article's lead picture
  • 500px for maps containing small detail

[编辑] Printing

Printed guidebooks maintained by Wikitravel Press add print attributes like print=float or print=fullpage to images included in the guide. These do not affect the Web display in any way, and should not be added or removed.

个人工具
名字空间
操作
导航
Docents
工具箱
其他语言