• Resolved sudhakarcool

    (@sudhakarcool)


    Hi Guys,

    Is there any way to lazy load images with small loading animated gif image in place of white image?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @sudhakarcool

    Thank you for your inquiry and your suggestion and I am happy to answer this.
    W3 Total Cache is not primarily an image optimization plugin and also since the “taste” is different for 1.5+ users and the animated gif would actually increase the loading time this is not something that we are focusing on.
    Thanks!

    bestonia

    (@bestonia)

    This is actually super easy to do with just a bit of css. Add the following to your theme file. In this case my loader gif was 32px by 32px big so I set the min height and width accordingly.
    It does make a world of difference to show a small loader to people to let them know the page is loading vs just nothing..

    img.lazy.loading {
    	background-image: url(/some/path/to/your/gif/lazyloader.gif)!important;
    	min-width: 32px!important;
    	min-height: 32px!important;
    	background-position: center!important;
            background-repeat: no-repeat!important;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need some modifications for lazy load’ is closed to new replies.