Optimize your website for faster loading —
In previous blog pages, I was working to optimize blogger pagespeed by implementing the suggestions from Pagespeed Insight, and I found the term “Defer OffScreen Images” or lazy-loading of images. Then I'm trying to implement a lazy loading technique on a blogger blog but got some issues. Optimizing photos for faster page loading, I had tried many scripts but as you know the script itself makes the page load slower. So is it possible to make blogger load faster with lazy loading all the images? Anser is YES, the lazy documentation says the images to be lazy-loaded after text loaded. Today I'll explain demonstrate how to lazy load image files in blogger and how these positively impact pagespeed score.
This guide will help you installing adding lazy loading function in blogger themes to improve the page loading speed fast. As you see, there are several posts about increasing blog loading speed and many methods to speed up site loading but the lazy load plugin for images will cause delay the image loading and so your page loading speed will increase.
For WordPress, there are a lot of plugins available that are ready to help blog loading speed. Lazy load is a WordPress plugin that causes differing image load and makes the text loads faster than post photos. But what about blogger blog, how to successfully add a lazy load script installed in your BlogSpot template? I'm going to share a simple jQuery lazy load script that will help you to boost the website or blog page speed dramatically. Once you install a lazy load mechanism in your website template you site speed will surely increase on loading. After adding a lazy script you can see the immediate effect on the pagespeed score.
In blogger HTML code you can see the default image src for all images, and the link is followed by the "data-original" attribute having the proper image URL. So the question arises: how lazyloader actually works?
Page loading VS Lazy loading
- Page loading: When you open any URL, your browser requests the data from the server, downloads all the images, texts, scripts, and it all affects big usage of bandwidth, causes slower page loading performance. Your page loading badly affected and so the bounce rate. So to overcome this, deferring the image loading is the best option to adopt.
- Lazy loading: It is the mechanism of deferring to load all data from the server until required instead of loading in advance. This can drastically increase web performance by decreasing the load on bandwidth usage that required to be rendered and shown on screen. Lazy loading of images is nothing but to load all image files only shown on the screen as per requests sequentially.
Also check; Optimize Blogger Template With gZip Compression
Add Lazy Load Script To Speed up Website/Blog LoadingNow you understand lazy loading of images improves web performance, let us install a lazyloader script to your website. Before doing anything, backup your blog HTML and its contents.
To make the whole template lazy-loaded you need to go to HTML view, and then modify each
imgtag according to the requirement of lazy load script.
Follow steps to implement lazy loading script and mechanism in any website including WordPress or blogger:
1. Backup your template first.
2. Go to your blogger dashboard. Choose the 'Theme' option from the left menu and click 'Edit HTML'
3. Now at the template end, you will see the code
</body>. Just above this body-end tag paste the following lazy loading script into your template.
const hasSupport = 'loading' in HTMLImageElement.prototype;document.documentElement.className = hasSupport ? 'pass' : 'fail';document.querySelector('span').textContent = hasSupport;
<!-- Lazy load offscreen images with lazysizes script end -->
4. Nowonwords, while writing the blog pages, you have to add lazyloader tag with each
imgtag as shown below:
Replace your existing code:
<img src="your-image-URL" alt="your-alt-tag" width="500" height="555" title="your-title-tag"/>
with the code as:
<img loading="lazy" src="your-image-URL" alt="your-alt-tag" width="500" height="555" title="your-title-tag"/>
5. Save template and check your website speed using Top 10 Free Mobile Speed Test Tools
So here today we have seen adding lazy loading plugin into blogger blog to defer offscreen images so that to improve the page loading. As you know page loading speed is the ranking factor as Google algorithm updates states, so lazy loading will improve your SEO ranking and so the positions on search SERPs and therefore you are able to drive more organic traffic to your site.
Adding lazyloader is most important not only for an SEO point of view but to improve user experience and to boost conversations.
If you successfully implemented a lazy load script into your website then share your views and comments via the below comment form.