diff --git a/lib/tasks/images.js b/lib/tasks/images.js index 23980f7e..ce9bc04c 100644 --- a/lib/tasks/images.js +++ b/lib/tasks/images.js @@ -30,7 +30,10 @@ module.exports = function(gulp, config) { } // Pipe images, with no transform - task.add(gulp.src(glob, { base: config.src_folder, cwd: config.dir, allowEmpty: true })) + if (glob.length) { + task.add(gulp.src(glob, { base: config.src_folder, cwd: config.dir, allowEmpty: true })) + } + // Pipe images, which has to be transformed for (var i = 0; i < imageObjects.length; i++) { (function () {