Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Include SVGO (or some optimizer) before inlining #86

Closed
elliottregan opened this issue Jun 29, 2018 · 2 comments
Closed
Labels

Comments

@elliottregan
Copy link

Removing comments is good, but more optimization features would be nice, too.

Similar concept for Webpack: https://github.com/webpack-contrib/svg-inline-loader

@jamesmartin
Copy link
Owner

Thanks for the opening this issue and linking to the Webpack library, @elliottregan. ✨

One of the reasons for allowing custom transformations of SVGs is to keep the core code simple and easy to maintain, while allowing individual users to depend on third-party SVG optimizers if they choose.

Another strategy, involving even less runtime complexity, would be to optimize SVGs separately from this library, perhaps as part of the asset pipeline or other build/deploy step, which could then be cached at boot time.

I'd be happy to help you get either or both of these strategies working but I'm not convinced that adding extra SVG optimization to the core of this library is a worthwhile feature.

@elliottregan
Copy link
Author

Thanks for the quick response! I think that optimizing the SVGs before deploying is the best route.

https://robots.thoughtbot.com/organized-workflow-for-svg <- that's what they did, and they also reference this helper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants