31-Jan-2022, 02:03 PM
Hi
I'm installing Gravatar from https://www.gravatar.com/avatar/d41d8cd9...g&s=72
Can we lazy load the gravata I want to ask?
I changed the following line in frontend/view/default/template/main/comment.tpl but it didn't work.
Do you have a suggestion?
this information
i changed. However, it was not successful
JS
I'm installing Gravatar from https://www.gravatar.com/avatar/d41d8cd9...g&s=72
Can we lazy load the gravata I want to ask?
I changed the following line in frontend/view/default/template/main/comment.tpl but it didn't work.
Do you have a suggestion?
Code:
<img src="{{ comment.avatar }}" width="72" height="72" class="cmtx_avatar" alt="Avatar">
this information
Code:
<img src="data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" class="lazy" width="72" height="72" alt="Avatar" data-original="{{ comment.avatar }}">
i changed. However, it was not successful
JS
Code:
<script src="https://www.domain.com/lazyload.js"></script>
<script charset="utf-8">
$(function () {
$("img.lazy").lazyload();
placeholder: "data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=";
effect: "fadeIn"
});
</script>