src/assets/buildImages.js
function buildImages(conf, undertaker) {

    const imageMinConfig = {
      progressive: true,
      svgoPlugins: [{
        removeViewBox: false
      }, {
        cleanupIDs: true
      }, {
        cleanupAttrs: true
      }]
    };

    const imageSrc = path.join(conf.themeConfig.root, conf.themeConfig.images.src, '**', '*');
    const imageDest = path.join(conf.themeConfig.root, conf.themeConfig.images.dest);

    return undertaker.src(imageSrc)
      .pipe(imagemin(imageMinConfig))
      .pipe(undertaker.dest(imageDest));

}
function buildImages(conf, undertaker) {

    const imageMinConfig = {
      progressive: true,
      svgoPlugins: [{
        removeViewBox: false
      }, {
        cleanupIDs: true
      }, {
        cleanupAttrs: true
      }]
    };

    const imageSrc = path.join(conf.themeConfig.root, conf.themeConfig.images.src, '**', '*');
    const imageDest = path.join(conf.themeConfig.root, conf.themeConfig.images.dest);

    return undertaker.src(imageSrc)
      .pipe(imagemin(imageMinConfig))
      .pipe(undertaker.dest(imageDest));

}
function buildImages ( conf , undertaker ) { const imageMinConfig = { progressive : true , svgoPlugins : [ { removeViewBox : false } , { cleanupIDs : true } , { cleanupAttrs : true } ] } ; const imageSrc = path . join ( conf . themeConfig . root , conf . themeConfig . images . src , '**' , '*' ) ; const imageDest = path . join ( conf . themeConfig . root , conf . themeConfig . images . dest ) ; return undertaker . src ( imageSrc ) . pipe ( imagemin ( imageMinConfig ) ) . pipe ( undertaker . dest ( imageDest ) ) ; }
Build project images.

@param {ConfigParser} conf A configuration parser object.
@param {Undertaker} undertaker An Undertaker instance.

@returns {Stream} A stream of files.
Build project images .