Outputting SVG from an asset field inside a matrix field with svg() I've set up an asset field inside a matrix field where a user can upload SVG icons, but I'm having trouble outputting them using the svg() function.
{# Correctly shows the path #}
{{ callout.icon[0].url }}

{# Correctly displays the SVG within an image tag #}
&lt;img src = &quot;{{ callout.icon[0].url }}&quot; alt=&quot;&quot;  /&gt;

{# No output #}
{{ svg(callout.icon[0].url) }}
{{ svg(callout.icon) }}

Can anyone see what I'm doing wrong with the svg() function? Other than being inside a matrix field, what I'm doing doesn't seem to differ from the example in the documentation. I'm trying to avoid using any plugins if at all possible.
Ok, think I know what's wrong – you want to select the first asset, but not its url. E.g.
{{ svg(callout.icon.one()) }}