svg-sprite
svg-sprite copied to clipboard
Inline the SVG and prevent load from sprite
Sometimes we need to inline the svg to prevent blinking and increase the lighthouse scoring when the svg is visible at render time. Is there any option to take the svg from the generated sprite and inline it instead of including it using the <svg><use xlink:href="#id"></use></svg> method? It would be fantastic to have a <svg-icon name="icon-name" inline="true" /> option or similar. A workaround is to use the url-loader plugin but it would be greatter to use the svgo optimized version from the generated sprite. Any ideas?
Thank you!
Sorry for the late response. For now, there are no options to do this in the module. But we can discuss this possibility in future versions
Nice, I think this feature is very interesting when you want to optimize the first meaningful paint and prevent blinks when the browser loads the svg sprite, also when loaded from cache.
It would be nice to provide possibility to inline some icons by default. It can be useful for workaround Chromium bug, see #4 and #92
Maybe this helps someone. https://gist.github.com/internetztube/42a1410aa9f3d042d0521e8d69480cc9
Definitely a much needed feature IMO. For target: static this provides a significant bump in lighthouse score.
Need so much please