commento.js: add lazy loading to avatar images

This commit is contained in:
pawurb 2020-05-06 22:59:28 +02:00 committed by Adhityaa Chandrasekar
parent 3c3cf08656
commit 326601394a

View File

@ -314,6 +314,7 @@
} else {
avatar = create("img");
attrSet(avatar, "src", cdn + "/api/commenter/photo?commenterHex=" + commenter.commenterHex);
attrSet(avatar, "loading", "lazy");
classAdd(avatar, "avatar-img");
}