mahnunchik / gulp-responsive

gulp-responsive generates images at different sizes
https://npmjs.com/gulp-responsive
MIT License
502 stars 62 forks source link

Source file not found (for existing file) #145

Open agocsbence opened 4 years ago

agocsbence commented 4 years ago

The task finishes with the following setup, but without result files:

gulp.task('srcset', function(){ return gulp.src('./assets/src/img/*.{png,jpg}') .pipe( responsive({ 'belga.png': [{ width: 300, rename: { suffix: '-300' } }, { width: 350, rename: { suffix: '-350' } }, { width: 700, rename: { suffix: '-700' } }] })) .pipe(gulp.dest('./assets/src/img/thumbnails')) });

But when an exact file is given in the src() path, it turns out, that the function can't find any files.

gulp.task('srcset', function(){ return gulp.src('./assets/src/img/belga.png}') .pipe( responsive({ 'belga.png': [{ width: 300, rename: { suffix: '-300' } }, { width: 350, rename: { suffix: '-350' } }, { width: 700, rename: { suffix: '-700' } }] })) .pipe(gulp.dest('./assets/src/img/thumbnails')) });

The img folder surely contains the image at the given URL.