Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/270422
Change subject: Don't use 'qlow' for NetSpeed=B ...................................................................... Don't use 'qlow' for NetSpeed=B The bulk of the benefit conferred by NetSpeed=B comes from the stripping of Hi-DPI variants. Encoding JPEGs with 'qlow' provides nominal benefit, at the cost of making image quality perceptibly worse. Change-Id: I315628aef324ca8d7a0186865b15fd5b1e0efbe9 --- M extension.json M includes/MobileFrontend.hooks.php 2 files changed, 0 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/22/270422/1 diff --git a/extension.json b/extension.json index 7315c12..504dca7 100644 --- a/extension.json +++ b/extension.json @@ -1926,9 +1926,6 @@ "ThumbnailBeforeProduceHTML": [ "MobileFrontendHooks::onThumbnailBeforeProduceHTML" ], - "ImageBeforeProduceHTML": [ - "MobileFrontendHooks::onImageBeforeProduceHTML" - ], "PageRenderingHash": [ "MobileFrontendHooks::onPageRenderingHash" ], diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 812fd21..0bf72c2 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -1230,30 +1230,6 @@ } /** - * If the NetSpeed designation is not MobileContext::NETSPEED_FAST, set - * image quality to 'low'. Currently this only influences JPEG encoding. - * - * @param Skin &$skin - * @param Title &$title - * @param File &$file - * @param array &$frameParams - * @param array &$handlerParams - * @param string &$time - * @param string &$res - */ - public static function onImageBeforeProduceHTML( &$skin, &$title, &$file, - &$frameParams, &$handlerParams, &$time, &$res ) { - $context = MobileContext::singleton(); - - if ( - $context->shouldDisplayMobileView() && - $context->getNetSpeed() !== MobileContext::NETSPEED_FAST - ) { - $handlerParams['quality'] = 'low'; - } - } - - /** * LoginFormValidErrorMessages hook handler to promote MF specific error message be valid. * * @param array $messages Array of already added messages -- To view, visit https://gerrit.wikimedia.org/r/270422 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I315628aef324ca8d7a0186865b15fd5b1e0efbe9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.27.0-wmf.13 Gerrit-Owner: Ori.livneh <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits