twolfson / grunt-spritesmith

Grunt task for converting a set of images into a spritesheet and corresponding CSS variables
MIT License
1.14k stars 92 forks source link

Automatically generate regular images from retina (@2x) ones? #168

Closed silentbugs closed 6 years ago

silentbugs commented 6 years ago

Can spritesmith generate the simple images from the retina 2x ones that are provided? I tend to only have a retina version of an icon and would don't want to have to track all of my icons twice.

twolfson commented 6 years ago

For scenarios like this, we recommend using a secondary grunt task to generate the normal sized images. Here are some plugins which can help with that:

silentbugs commented 6 years ago

@twolfson thanks for the response. Would it make sense to write a backend for grunt-spritesmith that resizes images, or do you think it's better to have it outside of grunt-spritesmith?

twolfson commented 6 years ago

I'd prefer to keep them separate is practical for purposes outside of spritesmith. Someone could definitely wrap spritesmith with something that does resizing. However, that's more to maintain and a less frequent use case