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

Support alternative datauri encodings #32

Closed
c6p opened this issue Mar 11, 2023 · 2 comments
Closed

Support alternative datauri encodings #32

c6p opened this issue Mar 11, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@c6p
Copy link

c6p commented Mar 11, 2023

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

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

@poppa
Copy link
Owner

poppa commented Mar 14, 2023

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

@poppa poppa added the enhancement New feature or request label Mar 14, 2023
poppa added a commit that referenced this issue Mar 18, 2023
It's now possible to pass the SVGO datauri option values as value to the `dataurl` query parameter, so `file.svg?dataurl=base64`, `file.svg?dataurl=enc` and `file.svg?dataurl=unenc` is now supported

This requires an upgrade to SVGO 3.x

This solves issue #32
@poppa
Copy link
Owner

poppa commented Mar 18, 2023

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.

@poppa poppa closed this as completed Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants