Jhernandez has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275880

Change subject: Only lazy load images after the first section
......................................................................

Only lazy load images after the first section

Bug: T127128
Change-Id: Ifdf41f723d677317a5ea6d36d8b55df2c9aac850
---
M includes/MobileFormatter.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/80/275880/1

diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index ff49f09..0e038b0 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -136,7 +136,8 @@
                $lazyLoadImages = $mfLazyLoadImages['base'] ||
                        ( $ctx->isBetaGroupMember() && 
$mfLazyLoadImages['beta'] );
 
-               if ( !$this->removeMedia && $lazyLoadImages) {
+               // Only lazy load images after the first section
+               if ( !$this->removeMedia && $lazyLoadImages && $sectionNumber > 
0) {
                        $this->doRewriteImagesForLazyLoading( $el, $doc );
                }
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/275880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdf41f723d677317a5ea6d36d8b55df2c9aac850
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to