2
我安裝了LiipImagineBundle。LiipImagineBundle和'filter not defined'
config.yml:
liip_imagine:
filter_sets:
my_thumb:
quality: 75
filters:
thumbnail: { size: [120, 90], mode: outbound }
AppKernel.php:
$bundles = array(
...
new Liip\ImagineBundle\LiipImagineBundle(),
);
當我要使用過濾器:
<td><img src="{{ asset('images/zestawy/'~entity.zdjecie) | imagine_filter('my_thumb') }}" /></td>
我得到這個錯誤:
An exception has been thrown during the rendering of a template ("Filter not defined: my_thumb")
什麼錯了?
是的,我做到了,就像指令說。 –
嘗試清除緩存: php app/console cache:清除--env =「dev」和php應用/控制檯緩存:clear --env =「prod」 – Simon
我在開始時刪除了緩存/ dev文件夾。沒事了。 :( –