我已经使用这种方法将 LiipImagineBundle 安装到 Symfony 2 -在 symfony 2.1 中安装和运行 LiipImagineBundle
我已经完成了它要求的一切,它最初创建了缩略图,但是如果我在 config.yml 中更改图像尺寸,图像不会改变!
我尝试使用 app/console cache:clear 清除缓存,但出现以下错误:
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove file /localhost/path/web//media/cache/my_thumb/media/test.jpg
这是我的树枝模板的样子:
<img src="{{ asset(entity.filename) | imagine_filter('my_thumb') }}" />
看起来好像无法删除图像以生成新图像,有什么想法吗?
更新:
这是我的路由文件:
# app/config/routing.yml
_imagine:
resource: .
type: imagine
这是我的配置文件:
# app/config/config.yml
liip_imagine:
filter_sets:
my_thumb:
quality: 75
filters:
thumbnail: { size: [120, 90], mode: outbound }