As mentioned in #118 and bug bounty 72142256, the extname option to rename as described in the README does not work (it works, it just gets overriden by the implicit format), so that all JPGs are force-renamed to 'jpeg', regardless of
input name,
the specfied extname, or
even a literal filename containing e.g. ".jpg"
… all get smashed to *.jpeg.
REPRO:
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
gulp.task('default', function () {
return gulp.src('img-src/*.jpg')
.pipe($.responsive({
'*.jpg': {
width: 200,
rename: {
suffix: '-200w',
extname: '.jpg'
},
}))
.pipe(gulp.dest('public/img'));
});
As mentioned in #118 and bug bounty 72142256, the
extname
option torename
as described in the README does not work (it works, it just gets overriden by the implicit format), so that all JPGs are force-renamed to 'jpeg', regardless of… all get smashed to
*.jpeg
.REPRO:
note that test.JPG → test.JPEG, not test.JPG
WORKAROUND:
omit
extname: '...'
and instead passformat: 'jpg'
Tada! 🎉