How to Lazy Load Gravatars in WordPress Comments


Lazy Loading Gravatars in WordPress
Theresa Bell

$tmpSrc = “data:image/svg+xml,%3Csvg xmlns=’http://www.w3.org/2000/svg'”
. ” width='{$width}’ height='{$height}’/%3E”;
<noscript>
<img width='<?=$width?>’ height='<?=$height?>’ alt=”<?=$alt?>” src=”<?=$src?>”>
</noscript>
<img width='<?=$width?>’ height='<?=$height?>’ alt=”<?=$alt?>” src=”<?=$tmpSrc?>” data-aym-lazy=”<?=$src?>”>

How to Use Lazy Loading for WordPress Comment Gravatars
Jung Wilbanks

Keeping your site fast is a vital concern if you want to stay competitive on the Internet. In fact, speed plays a role in performance in engines like Google. Because of this, it’s imperative you put effort into keeping speed at optimal levels. Using lazy load for gravatar images in WordPress comments is only one method to improve this performance.

WordPress.org
Lillie Butler

If I may be so bold, Divi is the most popular paid theme in the world, so I’d like to think it works. (cost me €200 for a lifetime license) With that said, I’m still not sure where the problem lies, so I am going to continue some testing, which will include cache flushing, and hopefully through a process if elimination I can find exactly where the problem is. Then we can take it from there.

Be the first to comment

Leave a Reply

Your email address will not be published.


*