poppa / sveltekit-svg

SvelteKit plugin that makes it possible to import SVG files as Svelte components, inline SVG code or urls
MIT License
235 stars 23 forks source link

Support alternative datauri encodings #32

Closed c6p closed 1 year ago

c6p commented 1 year ago

svgo has a datauri option to set the encoding: base64, enc (URI encoded), unenc. See https://github.com/svg/svgo/issues/105. Though, before v3 datauri field sometimes seems to be ignored: https://github.com/svg/svgo/pull/1679

This plugin currently only support base64. Could you honour the "datauri" field in optimization config?

poppa commented 1 year ago

I will take a look at it in the near future 👍

poppa commented 1 year ago

This should now be fixed in the latest version. Note that this issued a new major version since this feature required a version bump of the SVGO dependency to >=3.0.

Feel free to reopen this issue if this new feature doesn't work as expected.