Site logo

Archived topic

SVG Icons - host locally or use HTML?

3 replies · Started by Baz on January 20, 2021

Viewing posts 1–4 of 4

What's the best practice for adding your own SVG icons in GP theme?

I can create a 'Icons' folder (similar to fonts) and link to icons, or is it better to just place the SVG HTML code whenever it is needed?

Just wanted to know which option to use for optimal speed/performance.

Thanks.

Hi there,

For simple Icons - inline is the more ( although not necessarily noticeably ) performant method.

Warning on super complex SVGs that have lots of paths, they can trip excessive DOM node warnings in Googles metrics. Only see this once, but the user had a SVGs with 50+ paths in them :)

Thank you David.

By 'inline', do you mean use the insert HTML method?

Hi,

By ‘inline’, do you mean use the insert HTML method?

Yes, "Inline SVG" is <svg> added directly within the HTML structure.

This archived topic is closed to new replies.