Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp rev adds hash to image twice #241

Open
iknityanand opened this issue Apr 24, 2018 · 2 comments
Open

gulp rev adds hash to image twice #241

iknityanand opened this issue Apr 24, 2018 · 2 comments

Comments

@iknityanand
Copy link

iknityanand commented Apr 24, 2018

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.

@idshdx
Copy link

idshdx commented Jul 30, 2018

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

@XhmikosR
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants