andismith / grunt-responsive-images

Produce images at different sizes for responsive websites.
http://www.andismith.com/grunt-responsive-images/
MIT License
719 stars 96 forks source link

Custom destination does not use suffix #117

Open franz-josef-kaiser opened 7 years ago

franz-josef-kaiser commented 7 years ago

Expected Behaviour

With two tasks, both sharing the same name (to have the same destination directory), the image should get saved twice: Once without suffix (retaining the original name) and second time with the suffix.

Actual Behaviour

The image only gets saved once.

Steps to Reproduce

Take below configuration

PC/Mac and Graphics Engine used

OS X 10.11.5 GraphicsMagick 1.3.23 2015-11-07 Q16 ImageMagick 6.9.3-6 Q16 x86_64 2016-02-28

Grunt Configuration

resize : {
    options : {
        engine       : 'im',
        separator    : '_',
        newFilesOnly : false,
        sizes        : [
            {
                name    : 'large',
                width   : 1024,
                density : 72,
                quality : 80
            },
            {
                name    : 'large',
                width   : 1024,
                density : 144,
                suffix  : '_x2',
                quality : 60
            }
        ]
    },
    files : [ {
        expand      : true,
        src         : [ '*.{jpg,jpeg}' ],
        cwd         : 'dev/images/',
        //dest        : '.cache/'
        custom_dest : '.cache/{%= name %}/'
    } ]
}