jenkins-bot has submitted this change and it was merged.
Change subject: Fall back to mediawiki for formats Thumbor doesn't support
......................................................................
Fall back to mediawiki for formats Thumbor doesn't support
Bug: T120215
Change-Id: I291c6fc4595eb9698b1f05e8fc542d420e6d2c67
---
M puppet/modules/role/manifests/thumbor.pp
M puppet/modules/role/templates/thumbor/local_repo.php.erb
2 files changed, 32 insertions(+), 13 deletions(-)
Approvals:
Dduvall: Looks good to me, approved
jenkins-bot: Verified
diff --git a/puppet/modules/role/manifests/thumbor.pp
b/puppet/modules/role/manifests/thumbor.pp
index c9782f1..6877173 100644
--- a/puppet/modules/role/manifests/thumbor.pp
+++ b/puppet/modules/role/manifests/thumbor.pp
@@ -8,6 +8,7 @@
require ::role::memcached
require ::role::sentry
require ::role::swift
+ require ::role::thumb_on_404
include ::apache::mod::proxy
include ::apache::mod::proxy_http
include ::apache::mod::headers
@@ -22,6 +23,13 @@
mediawiki::settings { 'thumbor':
values => {
'wgIgnoreImageErrors' => true,
+ 'wgFileExtensions' => [
+ 'png',
+ 'gif',
+ 'jpg',
+ 'jpeg',
+ 'xcf',
+ ],
},
}
}
diff --git a/puppet/modules/role/templates/thumbor/local_repo.php.erb
b/puppet/modules/role/templates/thumbor/local_repo.php.erb
index 54871fe..ab3f2c4 100644
--- a/puppet/modules/role/templates/thumbor/local_repo.php.erb
+++ b/puppet/modules/role/templates/thumbor/local_repo.php.erb
@@ -1,15 +1,26 @@
$wgLocalFileRepo = array(
- 'class' => 'LocalRepo',
- 'name' => 'local',
- 'backend' => 'swift-backend',
- 'directory' => $wgUploadDirectory,
- 'scriptDirUrl' => $wgScriptPath,
- 'scriptExtension' => $wgScriptExtension,
- 'url' => 'http://127.0.0.1:6081' . $wgUploadPath,
- 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
- 'thumbScriptUrl' => $wgThumbnailScriptPath,
- 'transformVia404' => !$wgGenerateThumbnailOnParse,
- 'deletedDir' => $wgDeletedDirectory,
- 'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0,
- 'supportsSha1URLs' => true,
+ 'class' => 'LocalRepo',
+ 'name' => 'local',
+ 'backend' => 'swift-backend',
+ 'directory' => $wgUploadDirectory,
+ 'scriptDirUrl' => $wgScriptPath,
+ 'scriptExtension' => $wgScriptExtension,
+ // Formats unsupported by thumbor hit mediawiki
+ 'url' => $wgUploadPath,
+ 'zones' => array(
+ 'thumb' => array(
+ // Formats supported by thumbor hit varnish
+ 'urlsByExt' => array (
+ 'jpg' => 'http://127.0.0.1:6081' . $wgUploadPath . '/thumb',
+ 'png' => 'http://127.0.0.1:6081' . $wgUploadPath . '/thumb',
+ 'gif' => 'http://127.0.0.1:6081' . $wgUploadPath . '/thumb',
+ ),
+ ),
+ ),
+ 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
+ 'thumbScriptUrl' => $wgThumbnailScriptPath,
+ 'transformVia404' => !$wgGenerateThumbnailOnParse,
+ 'deletedDir' => $wgDeletedDirectory,
+ 'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0,
+ 'supportsSha1URLs' => true,
);
\ No newline at end of file
--
To view, visit https://gerrit.wikimedia.org/r/256687
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I291c6fc4595eb9698b1f05e8fc542d420e6d2c67
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits