Open hhhapz opened 3 years ago
I suppose this could be achieved two fold, by writing a partial svg to the writer before using svgo, or embedding the svg, especially as the target for this library is generation specifically. Curious to know what your thoughts are on this, and if it's out of scope, feel free to close the issue :). Thanks for the great lib 😀
See: https://github.com/ajstarks/svgo/blob/master/codepic/codepic.go for an approach to this.
Hey @ajstarks the placepic solution is really elegant! Thanks for writing it. Would you be open if I opened a PR that is a bit more simplified version of it that focuses more on embedding an svg within another? Perhaps under the name embed.go
. Let me know if you are cool with that :)
sure, I'm ok with reviewing embed.go.
Would be really cool if we could get functionality that allowed us to take an already existing svg (a file, for example) and import it into svgo and modify it!
This would be really helpful when working with large preexisting svgs and adding dynamic content on top of it :)
Here how I envision it to be used: