Installing and running LiipImagineBundle in symfony 2.1

大憨熊 提交于 2019-12-04 09:50:22

When I replaced

 <img src="{{ asset('bundles/acmedemo/images/1.jpg') | imagine_filter('my_thumb') }}" />

with

 <img src="{{ 'bundles/acmedemo/images/1.jpg' | imagine_filter('my_thumb') }}" />

I got the thumbnail. I removed the asset() helper of twig and it worked but dont know how it worked.

You might do: <img src="{{ (asset('bundles/acmedemo/images/1.jpg')) | imagine_filter('my_thumb') }}" /> because the filter filters the full image path and not only what asset() cointains, to mean you may also include the 'asset()'

Thanks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!