From: Federico Leva Date: Fri, 6 Nov 2015 19:24:30 +0000 (+0100) Subject: Hotlink InstantCommons images by default to speed up parsing X-Git-Tag: 1.31.0-rc.0~9071^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=c5f80a4af59e6f7fc8f73e364ded43f9e23ac67d;hp=c2306755852e9206c7b85221209138d586e8c0ee;p=lhc%2Fweb%2Fwiklou.git Hotlink InstantCommons images by default to speed up parsing The configuration, tested on wiki.wikimedia.it, generally improves performance for all parties involved. Bug: T114098 Change-Id: I76a34e8782908a28523531b2a928ea4ef7710b19 --- diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 13b9ba26de..c2c88d3ea9 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -45,7 +45,11 @@ production. creation of passwordless "system" users for logged actions. * $wgMaxSquidPurgeTitles was removed. * $wgAjaxWatch was removed. This is now enabled by default. -* (T27397) WebP is enabled by default as an uploadable filetype +* $wgUseInstantCommons now hotlinks Commons images by default instead of + downloading originals and thumbnailing them locally. This allows wikis to save + on CPU and bandwidth while reducing time to first byte for pages, even without + a thumbnail handler. See $wgForeignFileRepos documentation for tweaks. +* (T27397) WebP is enabled by default as an uploadable filetype. === New features in 1.27 === * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as diff --git a/includes/Setup.php b/includes/Setup.php index 0b6b018015..69a041e000 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -238,7 +238,10 @@ if ( $wgUseInstantCommons ) { 'class' => 'ForeignAPIRepo', 'name' => 'wikimediacommons', 'apibase' => 'https://commons.wikimedia.org/w/api.php', + 'url' => 'https://upload.wikimedia.org/wikipedia/commons', + 'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/commons/thumb', 'hashLevels' => 2, + 'transformVia404' => true, 'fetchDescription' => true, 'descriptionCacheExpiry' => 43200, 'apiThumbCacheExpiry' => 86400,