Reputation: 1
I want to compress the images and pipe to the directory of dist,but the dist is empty after run the task. this is my task
gulp.task("minify_img", function() {
gulp.src("src/img/*")
.pipe(imagemin())
.pipe(gulp.dest("/dist/img"));
});
Upvotes: 0
Views: 2620
Reputation: 3895
With your current destination path /dist/img
, the files will be at the root of your drive (e.g. D:/dist/img
). You should add a dot before it, then the files will be exported to the root of your project.
.pipe(gulp.dest("./dist/img"));
Upvotes: 0