web/_includes/lozad.html
2020-05-29 06:18:53 +08:00

8 lines
No EOL
326 B
HTML

<!-- image lazy load: https://github.com/ApoorvSaxena/lozad.js -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
<script type="text/javascript">
const imgs = document.querySelectorAll('#post-wrapper img');
const observer = lozad(imgs);
observer.observe();
</script>