imagemin icon indicating copy to clipboard operation
imagemin copied to clipboard

imagemin 7.0.0 does not generate output png on docker alpine

Open ralphkocher opened this issue 6 years ago • 4 comments

after upgrading from 6.1.0 to 7.0.0 (both with plugins: imagemin-jpegtran 6.0.0, imagemin-pngquant 8.0.0) imagemin no longer creates an output file for png compression with the following command:

await imagemin(['input.png'], '/output/path', {
  plugins: [
    imageminJpegtran(),
    imageminPngquant({
      quality: [0.6,0.7],
    }),
  ],
});

on docker with latest stable alpine.

after switching back to 6.1.0 it works again as expected.

any ideas? thanks

ralphkocher avatar Jul 04 '19 10:07 ralphkocher

i have the same issue

karnadii avatar Jul 06 '19 23:07 karnadii

Wrong call

await imagemin(['input.png'], '/output/path', {
  plugins: [
    imageminJpegtran(),
    imageminPngquant({
      quality: [0.6,0.7],
    }),
  ],
});
await imagemin(['input.png'], {
  destination:  '/output/path',
  plugins: [
    imageminJpegtran(),
    imageminPngquant({
      quality: [0.6,0.7],
    }),
  ],
});

erik-seifert avatar Jul 10 '19 13:07 erik-seifert

Thanks!

ralphkocher avatar Jul 10 '19 13:07 ralphkocher

It'd be great if the latest version was running a quick check for the old function signature and threw an error if the second argument is a string. Took me quite some time to fix my code after the version bump.

kachkaev avatar Aug 02 '19 21:08 kachkaev