Skip to content

Commit e089cd9

Browse files
committed
Improve the selector for lazy loading images (fix #313)
When `page.dynamic_title` is set to false, the image will not be loaded
1 parent 2c76dc2 commit e089cd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_includes/lozad.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
55

66
<script type="text/javascript">
7-
const imgs = document.querySelectorAll('.post-content img');
7+
const imgs = document.querySelectorAll('#main > div.row:first-child > div:first-child img');
88
const observer = lozad(imgs);
99
observer.observe();
1010
</script>

0 commit comments

Comments
 (0)