title: How to lossless optimize images with plugins for grunt-contrib-imagemin?
body: <p>I am trying to <strong>lossless</strong> optimize JPEG / PNG images with <code>imagemin</code>, but I have a problem when using extensions, they "deoptimize", meaning the result image is bigger than the original. How can I prevent this?</p>
  
  <p>This is my <strong>Gruntfile.js</strong></p>
  
  <pre><code>...
  grunt.initConfig({
      imagemin: {
          jpeg: {
              options: {
                  //by default it uses imageminJpegtran
                  progressive: true,//default false, progressive JPEG is better compression https://superuser.com/questions/463477/progressive-jpeg-quality-compare-to-normal-jpeg
                  arithmetic: false,//true breaks image
  
                  //don't know how to use it loseless without making the images even bigger
                  // use: [
                  //  imageminMozjpeg({
                  //      quality: 95, //Compression quality, in range 0 (worst) to 100 (perfect).
                  //      dcScanOpt: 2,//2 Optimize between one scan for all components and one scan for 1st component plus one scan for remaining components
                  //      arithmetic: false// false, or it breaks the image
                  //  }),
                  // ],
              },
              files: [{
                  expand: true,
                  cwd: '/www',
                  src: ['**/*.{jpg,jpeg,JPG,JPEG}'],
                  dest: '/www',
                  filter: 'isFile'
              }]
          }
      }
  });
  ...
  </code></pre>