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' );
如果需要图片渐入效果可以在Common.css加入
.lazyload,
.lazyloading {
opacity: 0;
}
.lazyloaded {
opacity: 1;
transition: opacity 300ms;
}
- 懒加载由lazysizes.js完成