impl. lazy loading and better media lists

This commit is contained in:
Dennis Eichhorn 2020-09-25 18:01:29 +02:00
parent f21dd4b4b8
commit 6aa5b2f96d
2 changed files with 4 additions and 4 deletions

View File

@ -38,8 +38,8 @@ $next = empty($accounts) ? '{/prefix}profile/list' : '{/prefix}profile/list?
<?php $count = 0; foreach ($accounts as $key => $account) : ++$count;
$url = UriFactory::build('{/prefix}profile/single?{?}&id=' . $account->getId()); ?>
<tr tabindex="0" tabindex="0" data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><img width="30" class="profile-image"
data-lazyload="<?=
<td><a href="<?= $url; ?>"><img width="30" loading="lazy" class="profile-image"
src="<?=
$account->getImage() instanceof NullMedia ?
UriFactory::build('Web/Backend/img/user_default_' . \mt_rand(1, 6) .'.png') :
UriFactory::build('{/prefix}' . $account->getImage()->getPath()); ?>"></a>

View File

@ -68,8 +68,8 @@ echo $this->getData('nav')->render();
<span class="rf">
<div><img id="preview-profileImage" class="m-profile rf"
alt="<?= $this->getHtml('ProfileImage'); ?>"
itemprop="logo"
data-lazyload="<?=
itemprop="logo" loading="lazy"
src="<?=
$profile->getImage() instanceof NullMedia ?
UriFactory::build('Web/Backend/img/user_default_' . \mt_rand(1, 6) .'.png') :
UriFactory::build('{/prefix}' . $profile->getImage()->getPath()); ?>"