jenkins-bot has submitted this change and it was merged.
Change subject: Provide URLs for img srcset
......................................................................
Provide URLs for img srcset
Bug: T88827
Bug: T117003
Change-Id: I73aec52484d82635ff4f19c4e93cdd462d944b2e
---
M includes/ApiParsoidBatch.php
1 file changed, 9 insertions(+), 0 deletions(-)
Approvals:
Subramanya Sastry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php
index eefd826..c285034 100644
--- a/includes/ApiParsoidBatch.php
+++ b/includes/ApiParsoidBatch.php
@@ -207,6 +207,15 @@
if ( $mto->isError() ) {
$result['thumberror'] = $mto->toText();
} else {
+ // Do srcset scaling
+ Linker::processResponsiveImages( $file, $mto,
$txopts );
+ if ( count( $mto->responsiveUrls ) ) {
+ $result['responsiveUrls'] = array();
+ foreach ( $mto->responsiveUrls as
$density => $url ) {
+
$result['responsiveUrls'][$density] = wfExpandUrl( $url, PROTO_CURRENT );
+ }
+ }
+
// Proposed MediaTransformOutput serialization
method for T51896 etc.
if ( is_callable( $mto, 'getAPIData' ) ) {
$result['thumbdata'] =
$mto->getAPIData();
--
To view, visit https://gerrit.wikimedia.org/r/249948
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I73aec52484d82635ff4f19c4e93cdd462d944b2e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI
Gerrit-Branch: master
Gerrit-Owner: Tim Starling <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits