Yeah this is purely in the context of Phoenix HTML.
I created a quick repo to demonstrate the issue. Using the function above, it’s definitely returning the tuple:
> DynImg.inline_svg("eex_test")
{:safe,
"<svg width=\"100%\" height=\"60px\" viewBox=\"0 0 113 60\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n\t<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" font-family=\"ArialMT, Arial\" font-size=\"24\" font-weight=\"normal\">\n<g transform=\"translate(-244.000000, -76.000000)\" fill=\"#000\">\n<text>\n <tspan x=\"240.822\" y=\"122\"><%= \"Inlined by function\" %></tspan>\n</text>\n</g>\n </g>\n</svg>"}
and for plain old SVG images it works exactly as expected. It’s only when I try to inline files with <%= %>, essentially treating the SVGs as templates that I have a problem.
Following @mindok’s link I seem to have to explicitly call EEx, in this case Phoenix.HTML.Engine and pass it through again but after spending the morning on it I’m not sure if I’m even any closer to an answer.






















