-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Replace base64 with plain body #577
Comments
That's a very interesting option! We could special-case |
bump |
It is already possible to embed image into tag, just make sure to replace double quotes with single ones. Here I replace gitter logo with appveyor: |
More info here - https://codepen.io/tigt/post/optimizing-svgs-in-data-uris |
Should I consider this bug fixed, @thekondrashov? |
Feel free to reopen if you'd like to discuss further. |
The image as mentioned by techtonik is not working, neither in chrome nor in safari. It shows an error |
@MetalArend yes, it became broken after some Chrome version (or maybe GitHub?). See #507 (comment) for fixed examples. |
Cool, thanks! :) |
At the moment, badges with icons such as these:
… contain svg-logos in the base64-coded form in the attribute of
<image />
tag:But it is possible to embed one svg-image into another svg-image as plain body. For example:
Test it with the example in the wild: https://commons.wikimedia.org/wiki/File:English_language.svg
In this case, child svg inherits properties of parent svg, but you can override them:
You even can remove
xmlns="http://www.w3.org/2000/svg"
attribute from child svg!Using this tip you can replace the huge base64 code with simple, short and readable plain code.
But of course, it breaks the current algorithm for generating the badges. What do you think?
The text was updated successfully, but these errors were encountered: