SVG and LiveView. To inline or not to inline?

I’m always tempted to inline SVGs, since they are easy to manage from code, but at the same time I worry about losing out on that caching goodness. On the other hand, the path instructions for a simple SVG icon are barely longer than the path for an image file, so do you actually gain anything from caching in that case? Any thoughts on the matter?

The Heroicons components included in Phoenix 1.7 does it inline so I imagine it’s not too much of a concern!

4 Likes

Thanks, I didn’t even know Heroicons came with 1.7 :smiley:

1 Like