This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Loading Gravatar Lazy Load
#1

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?

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>
Reply
#2

Shouldn't the parameters end with a comma rather than a semicolon?

For example:
Code:
$("img.lazy").lazyload(),

Instead of:
Code:
$("img.lazy").lazyload();

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by kbadmin
28-May-2019, 07:16 PM
Last Post by Steven
08-Apr-2015, 11:53 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)