title: How to set gulp.dest() in same directory as pipe inputs?
body: <p>I need all the found images in each of the directories to be optimized and recorded into them without setting the path to the each folder separately. I don't understand how to make that.</p>
  
  <pre><code>var gulp = require('gulp');
  var imageminJpegtran = require('imagemin-jpegtran');
  
  gulp.task('optimizeJpg', function () {
  
  return gulp.src('./images/**/**/*.jpg')
      .pipe(imageminJpegtran({ progressive: true })())
      .pipe(gulp.dest('./'));
  });
  </code></pre>