title: Using gulp-image or Gulp-imagemin with multiple subdirectories
body: <p>I am using <a href="https://www.npmjs.com/package/gulp-image" rel="nofollow noreferrer">Gulp-image plugin</a> atm (Also tried gulp-imagemin).</p>
  
  <h1>My gulpfile.js markup:</h1>
  
  <pre><code>// Include gulp
  const gulp = require('gulp')
  
  // Include gulp plugins
  const images = require('gulp-image')
  
  // Image optimalization
  gulp.task('images', () =&gt; {
    gulp.src('uploads/**/*')
    .pipe(images())
    .pipe(gulp.dest('./Compressed-images/'));
  })
  
  gulp.task('default', ['images'])
  </code></pre>
  
  <p>Now this is where it goes wrong:</p>
  
  <pre><code>gulp.src('uploads/**/*')
  </code></pre>
  
  <p>It only takes all images from the subdirectories in the directory:</p>
  
  <pre><code>uploads/
  </code></pre>
  
  <p>Is there any way to access the images for multiple levels of directories without having to type them all out?</p>
  
  <h1>For example:</h1>
  
  <p>Accesing images in the directory:</p>
  
  <pre><code>uploads/sub-dir-1/sub-dir-3/sub-dir-3/
  </code></pre>
  
  <p>Without having to typ something like this?</p>
  
  <pre><code>uploads/sub-dir-1/sub-dir-2/sub-dir-3/*.jpg
  uploads/**/**/**/*.jpg
  </code></pre>
  
  <h3>I read the following posts</h3>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/36726388/gulp-rename-all-images-based-on-other-directory">Gulp rename all images based on other directory</a></li>
  <li><a href="https://stackoverflow.com/questions/27712566/gulp-imagemin-how-to-disregard-directory-structures">gulp-imagemin - how to disregard directory structures?</a></li>
  <li><a href="https://stackoverflow.com/questions/38015384/replicating-directory-structure-in-gulp-dest">Replicating directory structure in Gulp dest</a></li>
  </ul>
  
  <p>But couldn't find an answer there.</p>