There already exist similar questions (concatenation in twig, concatenation in Assetic), but it is not helping me.
I am trying to display an image from the path and image name passed from controller:
{% image 'bundles/index/uploads/logos/' ~ fileName %}
<img src="{{ asset_url }}" />
{% endimage %}
And I am getting an error:
Unexpected token "operator" of value "~"
How to overcome this issue? It seems that concatenation is not allowed in {% image %}
P.S.
<img src="{{ asset('bundles/index/uploads/logos/' ~ university.getLogo) }}" />
This works fine, but I am up to Assetic due filter and output management.