gulp-rev icon indicating copy to clipboard operation
gulp-rev copied to clipboard

gulp rev adds hash to image twice

Open iknityanand opened this issue 7 years ago • 2 comments

Description

Hi i am doing gulp build for my project and i am using gulp-rev to add hash to image.

current output: http://localhost:9000/images/sidebar-toggler-inverse-de429b56fc-27b3277454.png

expected Output: http://localhost:9000/images/sidebar-toggler-inverse-de429b56fc.png

As you can see it is adding rev twice to the same file. For the rest of the images in project it is appending only once.

Steps to reproduce

My gulp is as follows:

gulp.task('images', function () { return gulp.src(config.app + 'content/images/**') .pipe(plumber({errorHandler: handleErrors})) .pipe(changed(config.dist + 'content/images')) .pipe(imagemin({optimizationLevel: 5, progressive: true, interlaced: true})) .pipe(rev()) .pipe(gulp.dest(config.dist + 'content/images')) .pipe(rev.manifest(config.revManifest, { base: config.dist, merge: true })) .pipe(gulp.dest(config.dist)) .pipe(browserSync.reload({stream: true})); });

Kindly assist me.

iknityanand avatar Apr 24 '18 11:04 iknityanand

Same issue, not related to images per se. Instead of replacing the hash, it generates a new one besides the old one: dist/index-8078e662ee-8078e662ee.html => dist/index-8078e662ee-8078e662ee-8078e662ee.html

idshdx avatar Jul 30 '18 13:07 idshdx

The tool doesn't distinguish between revved and unrevved files thus this.

XhmikosR avatar Oct 22 '18 07:10 XhmikosR