Symfony 2.7 : asset component not working with imagine_filter Symfony 2.7 : asset component not working with imagine_filter symfony symfony

Symfony 2.7 : asset component not working with imagine_filter


Apply the filter to the relative path directly, asset() can be seen as a sort of helper:

<img src="{{ asset('user.png'|imagine_filter('default')) }}">

You can also sett the version (4th parameter) to false:

<img src="{{ asset('user.png'|imagine_filter('default'), null, false, false) }}">


You should explicitly point to the package that you want to use for concrete asset:

<img src="{{ asset('user.png', 'images') | imagine_filter('default') }}" alt="Image de profil" class="img-circle whitebg">