How to implement Lazy Load feature of Blocs to the webpages by my hand?

Hi! A have several websites created with Blocs 2.3. Now we have Blocs 2.4 Beta where lazy load feature was implemented. How can I implement lazy load feature to a website that was created and exported from Blocs app by my hand without using Blocs.

I don’t want to use Blocs for my projects because I’ve made so many changes to my projects after exporting from Blocs app.

Any ideas, guys?

Do the following.

• Add the Lazy load JS script to the webpages in the header.
• Go to every img, iframe, video in the pages and give them the class lazyload.
• Go to every img, iframe, video in the pages and change the src attribute to data-src.

On a side note, you should share your mods to your projects with me, there may be some things I can get blocs todo for you, my goal is to make the projects files as close to production ready as possible.

1 Like

Thank you, Norm! :+1:

1 Like

@Norm @Pealco I sort of want to do the opposite…

Statcounter will NOT work at all in Blocs 3.4.x if Lazy Load is enabled in Project Settings. Even though disabling Lazy Load is a fix for Statcounter, I lose all the Lazy Load benefits. I therefore want to enable Lazy Load for everything EXCEPT Statcounter. Is this possible?

Right now, the following Statcounter code is placed inside a Code Widget which is inside a DIV in my footer:

<p style="color:#999999">カウンター
<script type="text/javascript">
var sc_project=752692; 
var sc_invisible=0; 
var sc_security="a42fbbd1"; 
var sc_text=2; 
var scJsHost = "https://";
document.write("<sc"+"ript type='text/javascript' src='" +
<noscript><div class="statcounter"><a title="Web Analytics"
href="" target="_blank"><img
alt="Web Analytics"></a></div></noscript>