Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:$wgResponsiveImages

From mediawiki.org
Translate this page
Languages:
Thumbnail settings: $wgResponsiveImages
Whether or not to output high-resolution images for high-DPI displays
Introduced in version:1.21.0 (Gerrit change 24115;git #Id80ebd0)
Removed in version:Still in use
Allowed values:(boolean)
Default value:true
Other settings:Alphabetical |By function

Details

[edit]

Whether or not to output high-resolution images forhigh-DPI displays.

This is primarily targeted at tablet browsers and newer desktops and laptops, such as the MacBook Pro with Retina display.On these high-DPI devices, raster images appear blurry or pixelated by default without special treatment.

When generating thumbnail images, thumbnails are rendered not only at the requested size, but at 1.5x and 2x the requested size.The HTML5srcset attribute is included on theimg specifying these larger images for the appropriate display densities.

Native support for thesrcset attribute was firstadded to WebKit browsers in August 2013 and has since been adopted by most modern browsers, now (as of 2020) reaching over94% of users globally.

Known limitations

[edit]

This code applies only to images created throughLinker:

  • article thumbnails (1.21+)
  • file: page detail displays (1.23+)
  • image galleries (1.25+)
  • the imageinfo API (1.36+)


Display densities

[edit]

Currently (as of 1.39) the densities used (1.5x and 2x) are hardcoded and not configurable.1x is the implied default density of the main image.

Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:$wgResponsiveImages&oldid=6473504"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp