Specify loading="eager" for smileys
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 27 Apr 2021 14:07:24 +0000 (16:07 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 27 Apr 2021 14:07:24 +0000 (16:07 +0200)
see #3980

wcfsetup/install/files/lib/data/smiley/Smiley.class.php

index 9b1b57e6ff24c70c44962a7d04ae252a712bbad4..20bc1a772666bf1f3b96632a77e8f7a09a519b0a 100644 (file)
@@ -139,6 +139,6 @@ class Smiley extends DatabaseObject implements ITitledObject
             $class = ' ' . $class;
         }
 
-        return '<img src="' . StringUtil::encodeHTML($this->getURL()) . '" alt="' . StringUtil::encodeHTML($this->smileyCode) . '" title="' . WCF::getLanguage()->get($this->smileyTitle) . '" class="smiley' . $class . '"' . $srcset . $height . $width . '>';
+        return '<img src="' . StringUtil::encodeHTML($this->getURL()) . '" alt="' . StringUtil::encodeHTML($this->smileyCode) . '" title="' . WCF::getLanguage()->get($this->smileyTitle) . '" class="smiley' . $class . '"' . $srcset . $height . $width . ' loading="eager">';
     }
 }