imagemin icon indicating copy to clipboard operation
imagemin copied to clipboard

preserve paths with imagemin-cli

Open Pomax opened this issue 4 years ago • 6 comments

Using imagemin images/**/*.png --out-dir=dist/images does not preserve the fairly crucial dir structure, dropping every image in the output dir, irrespective of what the glob ** matched. This means that things go very wrong when using, for instance:

+ images
   |  |
   |  + icon.png
   |
   + users
   |  |
   |  + icon.png
   | 
   + groups
      |
      + icon.png

Can imagemin-cli (and imagemin?) be update to preserve the subpath for images so that they get written to the output dir with the same dir structure as they were consumed?

Pomax avatar Mar 24 '20 21:03 Pomax

BUMP

This is ongoing since 2016.. https://github.com/imagemin/imagemin/issues/191

wfabritius avatar Mar 30 '20 16:03 wfabritius

@sindresorhus any chance to get this in? Especially with about a million weekly downloads, it seems weird to leave this bug in (because anything that can destructively overwrite files is def. not a feature).

Pomax avatar Mar 30 '20 16:03 Pomax

I am also unable to use the tool for this exact reason. Could this be bumped up please?

vraravam avatar Oct 08 '20 03:10 vraravam

Is this solved by #353 ? IF so, can it be merged and a new version released please?

vraravam avatar Oct 08 '20 03:10 vraravam

Hello, Is there any news regarding the essential feature, please ?

loranger avatar Apr 01 '21 09:04 loranger

#353 has some pending issue. Do chime in and make it through.

leesei avatar Jun 03 '21 04:06 leesei