excellenteasy / grunt-image-resize

Unmaintained. If you'd like to take this over please let us know. Resizing images made easy - thanks to imagemagick.
MIT License
57 stars 46 forks source link

Is it possible to resize based on some condition? #36

Closed rampatra closed 7 years ago

rampatra commented 7 years ago

I want to resize images only if a particular image isn't converted before or is not present in the destination folder. How can I do this?

I am using gulp-image-resize which is a fork of this project and my gulpfile is like:

var gulp = require('gulp');
var imageResize = require('gulp-image-resize');

gulp.task('default', function () {
    gulp.src('images/fulls/*')
        .pipe(imageResize({
            width: 1024,
            imageMagick: true
        }))
        .pipe(gulp.dest('images/fulls'));
    gulp.src('images/fulls/*')
        .pipe(imageResize({
            width: 512,
            imageMagick: true
        }))
        .pipe(gulp.dest('images/thumbs'));
});
davidpfahler commented 7 years ago

Am I mistaken, or are you not using this plugin, but rather gulp-image-resize, emphasis on gulp, not grunt?