- 🇨🇭Switzerland saschaeggi Zurich
Provide a text field in settings where you can store an inline SVG
I don't think we should provide this as it potentially could be a security risk.
Provide a text field in settings where you can store the path to a SVG, which is read and rendered as an inline SVG
You can already add an SVG logo. But it isn't rendered inline (again for Drupal security policy violation concerns).
Provide no new settings, but add a new overridable template with the toolbar-icon-home element, allowing users to enter their inline SVG in a template override
This would be great, but Drupal only has a template on the menu level (
menu--toolbar--gin.html.twig
).So the easiest for now might be to override the template mentioned above. You can easily load the contents of the SVG if you change this line
<img src="{{ file_url(icon_path) }}" class="toolbar-icon-home" alt="{{ 'Home'|t }}" />
to
{{ file_url(icon_path)|raw }}
I hope this helps. Cheers!