All Projects → mudkipme → Mediawiki Lazyload

mudkipme / Mediawiki Lazyload

Licence: mit
An extension to delay loading of images on MediaWiki pages.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Mediawiki Lazyload

mediawiki-antispam
Antispam extension for MediaWiki.
Stars: ✭ 15 (+87.5%)
Mutual labels:  mediawiki
Pywikibot
🤖 A Python library that interfaces with the MediaWiki API. This is a mirror from gerrit.wikimedia.org. Do not submit any patches here. See https://www.mediawiki.org/wiki/Developer_account for contributing.
Stars: ✭ 399 (+4887.5%)
Mutual labels:  mediawiki
Vanilla Lazyload
LazyLoad is a lightweight, flexible script that speeds up your website by deferring the loading of your below-the-fold images, backgrounds, videos, iframes and scripts to when they will enter the viewport. Written in plain "vanilla" JavaScript, it leverages IntersectionObserver, supports responsive images and enables native lazy loading.
Stars: ✭ 6,596 (+82350%)
Mutual labels:  lazyload
Accessible Image Lazy Load
😴 gandul! accessible lazy loading images
Stars: ✭ 281 (+3412.5%)
Mutual labels:  lazyload
Wptools
Wikipedia tools (for Humans): easily extract data from Wikipedia, Wikidata, and other MediaWikis
Stars: ✭ 371 (+4537.5%)
Mutual labels:  mediawiki
Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (+5175%)
Mutual labels:  mediawiki
copyvios
A copyright violation detector running on Wikimedia Cloud Services
Stars: ✭ 32 (+300%)
Mutual labels:  mediawiki
Nuxt Lazysizes
Lazysizes module for Nuxt.js
Stars: ✭ 25 (+212.5%)
Mutual labels:  lazyload
Wp Rocket
Performance optimization plugin for WordPress
Stars: ✭ 394 (+4825%)
Mutual labels:  lazyload
Progressively
A JavaScript library to load images progressively 🌇
Stars: ✭ 691 (+8537.5%)
Mutual labels:  lazyload
React Lazyload Fadein
React component to lazyload children with a nice fadein effect.
Stars: ✭ 305 (+3712.5%)
Mutual labels:  lazyload
Semanticmediawiki
🔗 Semantic MediaWiki turns MediaWiki into a knowledge management platform with query and export capabilities
Stars: ✭ 359 (+4387.5%)
Mutual labels:  mediawiki
Mwparserfromhell
A Python parser for MediaWiki wikicode
Stars: ✭ 440 (+5400%)
Mutual labels:  mediawiki
compose-mediawiki-ubuntu
Containerized Mediawiki install based on Ubuntu
Stars: ✭ 42 (+425%)
Mutual labels:  mediawiki
React Lazy Load Image Component
React Component to lazy load images and components using a HOC to track window scroll position.
Stars: ✭ 755 (+9337.5%)
Mutual labels:  lazyload
angular4-seed-starter
An angular4 starter with webpack2+aot+lazyload+hmr+scss(个人搭的angular4 starter,使用webpack2,包含aot、lazyload、scss、热替换功能等等)
Stars: ✭ 23 (+187.5%)
Mutual labels:  lazyload
Wikiteam
Tools for downloading and preserving wikis. We archive wikis, from Wikipedia to tiniest wikis. As of 2020, WikiTeam has preserved more than 250,000 wikis.
Stars: ✭ 404 (+4950%)
Mutual labels:  mediawiki
Hitchwiki
The Hitchhiker's Guide to Hitchhiking the World
Stars: ✭ 26 (+225%)
Mutual labels:  mediawiki
React Simple Img
🌅 React lazy load images with IntersectionObserver API and Priority Hints
Stars: ✭ 905 (+11212.5%)
Mutual labels:  lazyload
React Lazyload
Lazy load your component, image or anything matters the performance.
Stars: ✭ 5,408 (+67500%)
Mutual labels:  lazyload

MediaWiki Lazyload Extension

An extension to delay loading of images on MediaWiki pages.

Requirements

Lazyload extension requires MediaWiki 1.25 or higher.

Installation

To install the extension, place the entire Lazyload directory within your MediaWiki extensions directory, then add the following line to your LocalSettings.php file:

wfLoadExtension( 'Lazyload' );

If you are using the APNG extension on your wiki, please upgrade it to 0.2.0 or higher.

Configuration

Lazyload extension supports dynamically replace image hosts or disable HiDPI support for certain cases in JavaScript. This is particularly useful when your wiki wants to use multiple CDNs for various conditions.

mw.config.set('Lazyload.imageHost', YOUR_IMAGE_HOST);
mw.config.set('Lazyload.disableHidpi', true);

A use case in 52Poké Wiki is setting the image host to CDN only for non-logged in users, and another CDN domain backed by malasada for browsers supporting WebP to minimize traffic cost.

(function() {
    if (mw.config.get('wgUserName')) {
        return;
    }
    mw.config.set('Lazyload.imageHost', '//s0.52poke.wiki');
    mw.config.set('Lazyload.disableHidpi', true);

    function testWebP(callback) {
        var webP = new Image();
        webP.onload = webP.onerror = function () {
            callback(webP.height === 2);
        };
        webP.src = 'data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA';
    }

    testWebP(function (supported) {
        if (supported) {
            mw.config.set('Lazyload.imageHost', '//s1.52poke.wiki');
        }
    });
})();

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].