svg-module
svg-module copied to clipboard
Base64 encoding increases size of original svg
Default 'url-loader' uses base64 encoding, but SVG content is a human-readable xml string, using base64 encoding is not mandatory. Better to use svg-url-loader (or something similar) instead for '?data' flag.
Benefits:
- Resulting string is shorter (can be ~2 times shorter for 2K-sized icons);
- Resulting string will be compressed better when using gzip compression;
- Browser parses utf-8 encoded string faster than its base64 equivalent.
This is an excellent idea! I'm afraid I don't have time to work on this - would you be interested in submitting a PR?
@sam3d same story, if only will find the excess time🥲
If someone could implement that - feel free!