HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
12k stars 4.1k forks source link

Grunt script generating spritesmith.png should optimize images #4448

Closed crookedneighbor closed 8 years ago

crookedneighbor commented 9 years ago

Originally reported here: https://github.com/HabitRPG/habitrpg-shared/issues/60

@fmarier

dist/spritesmith.png currently weighs 308KB.

Running it through pngcrush -q -rem gAMA -rem alla -rem text brings it down to 194KB, running that through optipng -o9 brings it down to 192KB and then finally running that through advpng -z -4 brings it down to 175KB.

That's a 133KB saving (43% reduction in size) without changing the image at all.

I'm not a grunt expert so I'm not sure how to add that to the build script, but it seems to be worth it (especially on mobile).

@lefnire

sorry @fmarier , haven't forgotten about you or ignoring you. I see https://github.com/HabitRPG/habitrpg/pull/2079 , I'll tackle getting that into the grunt process soon as I squash some criticals. Thanks for the PR, man - stay tuned!

note to self: https://github.com/gruntjs/grunt-contrib-imagemin

@benmanley

This might also be worth a look: https://github.com/JamieMason/grunt-imageoptim

@crookedneighbor

@benmanley I checked out the link you posted, but it looks like it requires 3 downloads for Mac Applications. There's got to be a way to do this that doesn't require a Mac (or additional downloads on the part of the user), right?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

paglias commented 8 years ago

@crookedneighbor still an issue?