图库不懒加载图片

This commit is contained in:
1152958806@qq.com 2023-08-19 04:06:24 +08:00
parent cfe0fe791d
commit 6ac38725a8
1 changed files with 3 additions and 9 deletions

View File

@ -30,11 +30,8 @@
<div class="fj-gallery-item"
th:each="photo : ${photoFinder.listBy(param.photo_group_name)}">
<div th:if="${theme.config.photos.tagEnable}" class="tag-address">[[${photo.spec.displayName}]]</div>
<img th:src="${isLazyload ? dataImage : photo.spec.url}"
th:title="${photo.spec.description}"
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
th:data-lazy-src="${ isLazyload ? photo.spec.url : ''}"
th:alt="${photo.spec.description}">
<img th:src="${photo.spec.url}" th:alt="${photo.spec.description}"
th:title="${photo.spec.description}">
</div>
</div>
@ -56,10 +53,7 @@
<div class="fj-gallery-item"
th:each="photo : ${photoFinder.listBy(param.photo_group_name)}">
<div th:if="${theme.config.photos.tagEnable}" class="tag-address">[[${photo.spec.displayName}]]</div>
<img th:src="${isLazyload ? dataImage : photo.spec.url}"
th:data-lazy-src="${ isLazyload ? photo.spec.url : ''}"
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
th:alt="${photo.spec.description}"
<img th:src="${photo.spec.url}" th:alt="${photo.spec.description}"
th:title="${photo.spec.description}">
</div>