From: Alexander Ebert Date: Sun, 16 Jan 2022 14:11:09 +0000 (+0100) Subject: Enable lazy loading for embedded media X-Git-Tag: 5.5.0_Alpha_1~211^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4222bfda834f4dd74fdbadcfa9788cb5523514e8;p=GitHub%2FWoltLab%2FWCF.git Enable lazy loading for embedded media --- diff --git a/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php b/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php index cefe837077..40bb353fd1 100644 --- a/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php +++ b/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php @@ -186,7 +186,7 @@ class ViewableMedia extends DatabaseObjectDecorator return ' ' . StringUtil::encodeHTML($this->altText)
                     . 'title ? 'title="' . StringUtil::encodeHTML($this->title) . '" ' : '') - . 'style="width: ' . $width . 'px; height: ' . $height . 'px; margin-top: ' . $marginTop . 'px;"> + . 'style="margin-top: ' . $marginTop . 'px;" height="' . $height . '" width="' . $width . '" loading="lazy"> '; } }