This folder contains several demonstrations of how to use Imager.
Prior to run them, you need to clone or download this git repository:
git clone https://github.com/BBC-News/Imager.js.git
cd Imager.js/demosThis example in a simple use case using placehold.it to refrl the configured breakpoints.
open default/index.htmlThis example demonstrates how to use Grunt to generate your own responsive images and how to wire them with Imager.
This demo requires the following commands to be run...
brew install imagemagick graphicsmagick
npm install -g grunt-cli
npm installCheck out graphicsmagick install notes for other systems if needed.
You can also review the Gruntfile.js and update the custom sizes that you want to use according to grunt-responsive-images documentation...
grunt
open grunt/index.htmlThis examples demonstrates how to lazy load responsive images as the user scrolls.
It is a proof of concept rather than a production recommendation.
Please follow the requirements of Generating Responsives Images with Grunt.
grunt
open lazyload/index.html