Lazy load footer icons

Bug: T239377
Change-Id: I71270faf939f9187fafecf5b32defb3412c27580
This commit is contained in:
gilles 2020-06-09 13:34:15 +02:00 committed by VolkerE
parent 13926c3dd0
commit e60b08e212

View file

@ -986,6 +986,8 @@ abstract class Skin extends ContextSource {
$url = $icon["url"] ?? null;
unset( $icon["url"] );
if ( isset( $icon["src"] ) && $withImage === 'withImage' ) {
// Lazy-load footer icons, since they're not part of the printed view.
$icon["loading"] = 'lazy';
// do this the lazy way, just pass icon data as an attribute array
$html = Html::element( 'img', $icon );
} else {