Hello,
I'm trying to embed SVG graphics as inline SVG that are saved as page media files.
I know, that I can embed them as <img> with something like
{{ angebot.media.files|first.html('', '', 'img-responsive icon svg') }}
But this won't let me manipulate the SVG via CSS.
I need to have the SVG code inline in the DOM.
I searched, but all I could find was the TWIG
{{ source('my-svg.svg') }}
which only works for files that are inside the template directory.
In PHP I would use file_get_contents. But for TWIG I couldn't find an equivalent that works with files outside of the templates directory.
Is there some filter or function or an existing plugin that I can use or would I have to write a plugin?