gulp-img-retina
add img attribute 'srcset' for retina
Prerequisites
You must have retina images in the folder which the original image in.
Install
npm install gulp-img-retina
Usage
var gulp = ;var imgRetina = ;var retinaOpts =// Your options here.;gulp;
You put html in:
And get html out:
Options (Optional)
options.suffix
Type: Object
Default: {1: '', 2: '@2x', 3: '@3x'}
The suffix will insert to image's path, the key is resolution, and value is suffix.