Jhernandez has uploaded a new change for review.

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

Change subject: Add feature flag for lazy loading images
......................................................................

Add feature flag for lazy loading images

Bug: T124770
Change-Id: I8e9e6b3527c55159a06a8100f7291e22cb69cc54
---
M README.md
M extension.json
2 files changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/README.md b/README.md
index 3b8469d..5a0ddf7 100644
--- a/README.md
+++ b/README.md
@@ -226,6 +226,19 @@
        'base' => array(),
 );
 
+##### $wgMFLazyLoadImages
+Do load images in pages lazily. Currently it doesn't affect HTML-only clients
+(only JS capable ones) and it lazy loads images when they come close to the
+viewport.
+
+Type: Array
+Default: array(
+       // These will enable lazy loading images in beta mode
+       'beta' => false,
+       // These will enable lazy loading images in all modes
+       'base' => false,
+);
+
 ##### $wgMFNoMobileCategory
 DB key of the category which members will never display mobile view
 
diff --git a/extension.json b/extension.json
index 73fbf09..9c498c6 100644
--- a/extension.json
+++ b/extension.json
@@ -1994,6 +1994,10 @@
                        "beta": [],
                        "base": []
                },
+               "MFLazyLoadImages": {
+                       "base": false,
+                       "beta": false
+               },
                "MFNoMobileCategory": false,
                "MFNoMobilePages": [],
                "MFNearbyRange": 10000,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e9e6b3527c55159a06a8100f7291e22cb69cc54
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