Symfony LiipImagine Path过滤器

时间:2016-05-02 20:19:00

标签: symfony liipimaginebundle

我的路径有问题。

如果我把这个

{% set img = 'upload/img/'~cars.image~'' %}
<img src="{{img|imagine_filter('recherche') }}" alt="{{ cars.name}}{{ cars.model}}" />

我收到404错误“app_dev.php / media / cache / resolve / recherche / upload / img / upload / img / 79.jpeg”

所以我尝试删除'upload / img /',但我有这个错误:

An exception has been thrown during the rendering of a template ("Parameter "path" for route "liip_imagine_filter" must match ".+" ("" given) to generate a corresponding URL.") in VAPlatformBundle:Default:research.html.twig at line 50.

我有点困惑。

谢谢你的帮助!

1 个答案:

答案 0 :(得分:0)

尝试更改此行

  

{%set img ='upload / img /'~cars.image~''%}

通过

  

{%set img ='upload / img /'~cars.image%}