dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Integration tests for FileBackendGroup"
[lhc/web/wiklou.git]
/
includes
/
media
/
ThumbnailImage.php
diff --git
a/includes/media/ThumbnailImage.php
b/includes/media/ThumbnailImage.php
index
7ee6dcb
..
6e4412c
100644
(file)
--- a/
includes/media/ThumbnailImage.php
+++ b/
includes/media/ThumbnailImage.php
@@
-110,7
+110,7
@@
class ThumbnailImage extends MediaTransformOutput {
* @return string
*/
function toHtml( $options = [] ) {
* @return string
*/
function toHtml( $options = [] ) {
- global $wgPriorityHints, $wgPriorityHintsRatio, $wgElementTiming;
+ global $wgPriorityHints, $wgPriorityHintsRatio, $wgElementTiming
, $wgNativeImageLazyLoading
;
if ( func_num_args() == 2 ) {
throw new MWException( __METHOD__ . ' called in the old style' );
if ( func_num_args() == 2 ) {
throw new MWException( __METHOD__ . ' called in the old style' );
@@
-126,6
+126,10
@@
class ThumbnailImage extends MediaTransformOutput {
'decoding' => 'async',
];
'decoding' => 'async',
];
+ if ( $wgNativeImageLazyLoading ) {
+ $attribs['loading'] = 'lazy';
+ }
+
$elementTimingName = 'thumbnail';
if ( $wgPriorityHints
$elementTimingName = 'thumbnail';
if ( $wgPriorityHints