title: How to exclude folder in gulp task for images?
body: <p>I am using Gulp 4 for my frontend projects. I am want to exclude "fav" folder in "img" folder for gulp-imagemin. How can I do this? This is my project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/LO55h.png" rel="nofollow noreferrer">structure</a></p>
  
  <p>This is my gulpfile.js:</p>
  
  <pre><code>var paths = {
      html: {
          src: "src/**/*.html",
          dest: "dest/"
      },
  
      styles: {
          src: "src/styles/**/*.sass",
          dest: "dest/styles/"
      },
  
      scripts: {
          src: "src/js/**/*.js",
          dest: "dest/js/"
      },
  
      images: {
          src: "src/img/**/*.*",
          dest: "dest/img/"
      }
  };
  
  function images() {
      return gulp.src(paths.images.src)
          .pipe(imagemin({
              progressive: true,
              interlaced: true,
              use: [pngquant()],
          }))
          .pipe(svgo())
          .pipe(gulp.dest(paths.images.dest));
  }
  </code></pre>
  
  <p>Thanks and happy coding!</p>