Hotlink InstantCommons images by default to speed up parsing
authorFederico Leva <federicoleva@tiscali.it>
Fri, 6 Nov 2015 19:24:30 +0000 (20:24 +0100)
committerFederico Leva <federicoleva@tiscali.it>
Fri, 6 Nov 2015 19:29:04 +0000 (20:29 +0100)
The configuration, tested on wiki.wikimedia.it, generally improves
performance for all parties involved.

Bug: T114098
Change-Id: I76a34e8782908a28523531b2a928ea4ef7710b19

RELEASE-NOTES-1.27
includes/Setup.php

index 13b9ba2..c2c88d3 100644 (file)
@@ -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
index 0b6b018..69a041e 100644 (file)
@@ -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,