Wikipedia:Autosizing_images

Wikipedia:Autosizing images

Wikipedia:Autosizing images


The following are techniques to auto-size, or scale, any image ("thumb" or "frameless"), based on each user's default thumbnail size (220px for those not logged in or for those who have not changed it at Special:Preferences). Within an image link, the options are as follows:

  • thumb – displays the image as a framed thumbnail at the user's default size
  • frameless – displays the image as an unframed at the user's default size
  • upright – scales the image to approximately 75% of the user's default size (25% smaller)
  • upright=0.8 – scales the image to approximately 80% of the user's default size (20% smaller)
  • upright=1.2 – scales the image to approximately 120% of the user's default size (20% larger)
  • left – shifts the image to the left margin
  • right – shifts the image to the right margin
  • center – shifts the image to center between left/right margins

Each of the above sizing options can be used in any image link coded into a Wikipedia page, in the form [[File:Example.jpg|thumb|upright|left|Description]]. When a user views the page, the image will be resized based on the user's default image size setting.

Effects of upright

The available values for thumbnail size in Preferences (on the Appearance tab) are 120px, 150px, 180px, 200px, 220px (default), 250px, 300px, and 400px. As explained at Wikipedia:Extended image syntax § Size, upright=Factor will "adjust a thumbnail's size to Factor times the default thumbnail size, rounding the result to the nearest multiple of 10". That can be calculated on Wikipedia via {{#expr: SIZE * FACTOR round -1}}, which is how the following table was generated.

More information 120px, 150px ...

Examples

thumb, frameless, upright

The following examples use the "thumb" or "frameless" options to set an image to the default size, with "upright" to scale the image larger or smaller than the default size. When using these options, a small image will never be scaled larger than its original size.

More information Options used, Large image ...

In the examples above, the size of the image is scaled based on each user's default image size, which can be changed at Special:Preferences. Setting image size in pixels, such as "250px", would override the user's preference and display the image as 250px wide for all users who view that image on that page.

left, right, center

As shown in the prior examples, "thumb" defaults to right aligned, while "frameless" defaults to left aligned. This can be changed by using "left", "right", or "center". The following examples include lorem ipsum text before (in red) and after (in green) to show how it wraps around the image.

More information Alignment, thumb ...

Purpose of autosizing

Because many users have begun viewing Wikipedia articles on various smaller devices, not just desktop PC computers, the autosizing of images will allow each user to view those images as smaller pictures on handheld devices, such as laptops, notebook or tablet computers, and some mobile phones. The users can set their Special:Preferences to select their default image size (such as: 250px, 180px, or 120px), for whichever handheld device they use for viewing Wikipedia pages. Autosizing of images will also allow sight-impaired users, per WP:Access, to enlarge their default image-size (such as 300px) to perhaps see details more clearly.

See also

[ This essay is a quick draft to be expanded later. ]

Share this article:

This article uses material from the Wikipedia article Wikipedia:Autosizing_images, and is written by contributors. Text is available under a CC BY-SA 4.0 International License; additional terms may apply. Images, videos and audio are available under their respective licenses.