docs: function extractImages(css, options) {
  	var images = [];
  	var stylesheetRelative = options.stylesheetRelative || path.dirname(css.source.input.file);
  
  	if (!stylesheetRelative) {
  		log(options.logLevel, 'lv1', ['Lazysprite:', colors.red('option `stylesheetRelative` is undefined!')]);
  	}
  
  	// When the css file is in the second or more depth level directory of destination
  	// which relative to `stylesheetRelative`,
  	// ref path in css will wrong, so has to be fix it.
  	if (css.source.input.file) {
  		var stylesheetInputDirRelative = path.relative(options.stylesheetInput, path.dirname(css.source.input.file));
  		stylesheetRelative = path.join(stylesheetRelative, stylesheetInputDirRelative);
  	}
  
  	// Find @lazysprite string from css
  	css.walkAtRules('lazysprite', function (atRule) {
  		// Get the directory of images from atRule value
  		var params = space(atRule.params);
  		var atRuleValue = getAtRuleValue(params);
  		var sliceDir = atRuleValue[0];
  
  		// Get absolute path of directory.
  		var imageDir = path.resolve(options.imagePath, sliceDir);
  
  		// Check whether dir exist.
  		if (!fs.existsSync(imageDir)) {
  			log(options.logLevel, 'lv1', ['Lazysprite:', colors.red('No exist "' + imageDir + '"')]);
  			return null;
  		}
  
  		// Get indent format of the css content.
  		var atRuleNext = atRule.parent.nodes;
  		var rawNode = _.find(atRuleNext, function (node) {
  			return node.type === 'rule';
  		});
  
  		// Store the indent format.
  		if (rawNode === undefined) {
  			options.cloneRaws.between = '';
  			options.cloneRaws.after = '';
  		} else {
  			options.cloneRaws.between = rawNode.raws.between;
  			options.cloneRaws.after = rawNode.raws.after;
  		}
  
  		// Foreach the images and set image object.
  		var files = fs.readdirSync(imageDir);
  		files = _.orderBy(files); // Fix orders issue in mac and win's difference.
  		_.forEach(files, function (filename) {
  			// Have to be png or svg file
  			var reg = /\.(png|svg)\b/i;
  			if (!reg.test(filename)) {
  				return null;
  			}
  
  			var image = {
  				path: null, // Absolute path
  				name: null, // Filename
  				stylesheetRelative: stylesheetRelative,
  				ratio: 1,
  				groups: [],
  				isSVG: false,
  				token: ''
  			};
  
  			image.name = filename;
  
  			// Set the directory name as sprite file name,
  			// .pop() to get the last element in array
  			image.dir = imageDir.split(path.sep).pop();
  			image.groups = [image.dir];
  
  			// For svg file
  			if (/^\.svg/.test(path.extname(filename))) {
  				image.isSVG = true;
  				image.groups.push('GROUP_SVG_FLAG');
  			}
  
  			image.selector = setSelector(image, options, atRuleValue[1]);
  
  			// Get absolute path of image
  			image.path = path.resolve(imageDir, filename);
  
  			// For retina
  			if (isRetinaImage(image.name)) {
  				image.ratio = getRetinaRatio(image.name);
  				image.selector = setSelector(image, options, atRuleValue[1], true);
  			}
  
  			// Push image obj to array.
  			images.push(image);
  		});
  	});
  	return Promise.resolve([images, options]);
  }