How to lazy load images from 'Places' component?


  1. Make sure you are in development mode. Go to the end of your HTML file and set the 'data-main' attribute to 'js/index' instead of 'js/index.min'.
  2. Download the 'LazyLoad' pluign from GitHub and paste it in 'js/libs/' folder.
  3. Defin the pluign in your 'js/index.js' file like shown in the screenshot.
  4. Open the 'js/modules/portfolio.js' file and inside the 'init' function add the 'lazyload' call, like shown in the screenshot.
  5. Open your HTML file and search for 'alt="portfolio"'.
  6. For all the images you have found please follow these instructions.
    1. Change the 'src' attribute to 'data-original'
    2. Add the attributes width="400" and height="260"
    3. Add the class 'lazy'
    4. Finaly your image tag should look like this.

 


Last update:
2015-08-23 17:11
Author:
Vlad Sargu
Revision:
1.1
Average rating:0 (0 Votes)