alxshelepenok / gatsby-starter-lumen

A constantly evolving and thoughtful architecture for creating static blogs with Gatsby.
https://lumen.alxshelepenok.com
MIT License
1.99k stars 667 forks source link

Add support for SVG minification? #333

Closed vzhou842 closed 5 years ago

vzhou842 commented 5 years ago

My personal blog, which is based on this starter, uses a lot of SVGs, so I created gatsby-plugin-optimize-svgs to automatically minify SVGs at build time. This minification is quite significant - see screenshot below.

Screen Shot 2019-07-31 at 7 08 27 PM

I've had this live in production for a while and have had no issues. I'm wondering if this would be a good addition to gatsby-starter-lumen? A lot of sites use SVGs for icons / drawings / illustrations, and my guess is that the majority of them are not optimized. This plugin would be a lightweight addition to this starter - it does nothing if you have no SVGs, and it automatically minifies them if you do.

@alxshelepenok thoughts? I'm happy to submit a PR for this if you're onboard.

vzhou842 commented 5 years ago

Blog post on minifying SVGs for some more context: https://victorzhou.com/blog/minify-svgs/

alxshelepenok commented 5 years ago

@vzhou842 Well, let's try to add. Although it will not greatly affect, since the svg-files are not used.