T
T
t38c3j2015-07-07 11:08:02
JavaScript
t38c3j, 2015-07-07 11:08:02

How to reduce an image to a certain size and get its Data URI?

There is such a task, at the moment it just copies pictures to the dist folder

gulp.task('skins', ['clean'], function() {
  return gulp.src('src/img/skins/**')
    .pipe(gulp.dest('dist/skins'));
    // как понял надо уже тут писать
});

Actually, how to reduce pictures, for example, to 150x150 px after they have already been copied to dist / skins and get the Data URI of each picture and put it in an array, then I pass the array to the template ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antazy, 2015-07-21
@t38c3j

gulp-image-resize
gulp-base64

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question