Skip to content

Commit

Permalink
Check for existence of loading attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 authored May 31, 2024
1 parent 40a7fa3 commit 0e71592
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,9 @@
# Classes in the wikitext image syntax are applied to linkAttribs
$class = $linkAttribs['class'] ?? '';
if ( strpos( $class, 'mw-image-nolazyload' ) !== false ) {
$attribs['loading'] = 'eager';
if ( isset( $attribs[ 'loading' ] ) ) {
unset( $attribs['loading'] );
}
}
return true;
};

0 comments on commit 0e71592

Please sign in to comment.