grunt-responsive-images icon indicating copy to clipboard operation
grunt-responsive-images copied to clipboard

Files are not renamed when using custom_dest

Open svossen opened this issue 10 years ago • 2 comments

I use grunt-responsive-images to resize 2x icons to 1x icons. When I use custom_dest, the files are not renamed. When I use the regular dest the files are renamed correctly. This is my config:

responsive_images: {
    icons: {
        options: {
            sizes: [{
                name: '1x',
                width: '50%',
                height: '50%',
                suffix: '-1x'
            }, {
                name: '2x',
                width: '100%',
                height: '100%',
                suffix: '-2x'
            }]
        },
        files: [{
            expand: true,
            src: ['*.{jpg,gif,png}'],
            cwd: 'src/images/sprite/icons-original/',
            custom_dest: 'src/images/sprite/icons-{%= name %}/'
        }]
    },
}

Is there a way to use the file rename option in combination with the custom_dest option?

svossen avatar Jun 10 '14 11:06 svossen