title: Gulp: How to set up multiple sources and destinations in one task?
body: <p>I'm using <code>gulp-imagemin</code> to minify images in my <code>images</code> folder. The output of the task should be streamed into <code>dist/images</code> directory. However, the source <code>images</code> folder has a subfolder <code>images/headers</code> whose compressed contents should be streamed to <code>dist/images/headers</code>. So this is the source folder structure:</p>
  
  <pre><code>-images
    -headers
  </code></pre>
  
  <p>whose contents should be streamed to:</p>
  
  <pre><code>-dist
    -images (contents of `images`)
      -headers (contents of `images/headers`)
  </code></pre>
  
  <p>Currently my task definition looks like this:</p>
  
  <pre><code>gulp.task('compress', function () {
      return gulp.src('images/*')
          .pipe(imagemin({
              progressive: true,
              svgoPlugins: [{removeViewBox: false}],
              use: [pngquant()]
          }))
          .pipe(gulp.dest('dist/images'));
  });
  </code></pre>
  
  <p>My question is how I can tell Gulp to stream <code>images/headers</code> into <code>dist/images/headers</code> without writing a separate task for it.</p>
  
  <p>I know that I can pass array of sources, but then ho can I tell Gulp where to output processed contents of each destination so that each source has a different destination?</p>