Inline SVG with `svg()` from content folder

I want to use an inline SVG that the user uploads via the panel. Is this the best way to do it:

$path = $page->illustration()->toFile()->id();
echo svg('content/' . $path);

It works, but it seems sketchy to specify the content folder like that.

I think you can use this to get the absolute file path to be passed to the helper function:

1 Like

Yep, that did it. Thanks!