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

add SVGO implementation to optimize and clean SVGs #196

Open
Neoniq opened this issue Jul 9, 2024 · 4 comments
Open

add SVGO implementation to optimize and clean SVGs #196

Neoniq opened this issue Jul 9, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Neoniq
Copy link

Neoniq commented Jul 9, 2024

https://github.com/svg/svgo

There are nuxt modules with support for SVGO but they are not working out of the box with nuxt/icon (or not working at all like https://nuxt.com/modules/svg-sprite)

So i think it is good addition to already most perfect module

I myself find it frustrating to fix fill and stroke to be of currentColor. SVGO can do it for me just fine

@antfu
Copy link
Member

antfu commented Jul 15, 2024

Iconify icons should already be optimized. Do you mean for the custom svg icons? If in that case, I think it would make sense to have that. PR welcome if anyone wants to work on that. Thanks

@antfu antfu added enhancement New feature or request help wanted Extra attention is needed labels Jul 15, 2024
@Neoniq
Copy link
Author

Neoniq commented Jul 15, 2024

Yes for custom icons of course. I'm seeing nuxt icons becomes kinda all in one solution, because it is close enough for me already

@awacode21
Copy link

svgo for custom icon collection would be appreciated

@Blackskyliner
Copy link

Blackskyliner commented Sep 20, 2024

We could just use the iconify tools and while/after parsing them into the collection we could just pipe them through cleanSVG and runSVGO. Also adding the corresponding options to our configuration.

See: https://iconify.design/docs/libraries/tools/icon/cleanup.html and https://iconify.design/docs/libraries/tools/icon/svgo.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants