-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Inline SVGs as data URIs instead encoding it with base64
#1941
Comments
yeah, i want to add this. but general likely a separate rules for for reference: this is the rule for inline svg if anybody else wants to take a crack at adding https://github.com/roots/bud/blob/main/sources/%40roots/bud-build/src/handlers/rules/svg.inline.ts |
I changed my mind about |
- adds support for `svg-mini-data-uri` - adds unit test - update docs example use: ```ts body { background: url(@src/svg/demo.svg?inline); } ``` refers: - #1941 ## Type of change **PATCH: backwards compatible change** This PR includes breaking changes to the following core packages: - none This PR includes breaking changes to the follow extensions: - none ## Dependencies ### Adds - mini-svg-data-uri ### Removes - none
OK this is merged in #1948 |
@kellymears: Awesome, thank you! |
With the
6.6.6
release ofbud
assets, including SVGs can be now inlined by using theìnline
parameter.Inlining SVGs as
base64
strings is functionally fine, however SVGs can be inlined as data URIs with a much smaller overhead than using plainbase64
or URL encoding.The webpack documentation uses some generator config for using the
mini-svg-data-uri
for SVG files.bud
SVG inline rule:https://github.com/roots/bud/blob/v6.6.6/sources/@roots/bud-build/src/handlers/rules/svg.inline.ts#L8
The text was updated successfully, but these errors were encountered: