我安装了LiipImagineBundle,看起来捆绑包安装正确。在我的模板中,我添加了下面这行:
<img src="{{ asset('bundles/codecatsfront/images/python-bg.png') | imagine_filter('my_thumb') }}" alt="...">但此url存在服务器错误:http://pc.t/app_dev.php/media/cache/my_thumb/bundles/codecatsfront/images/python-bg.png
我的python-bg.png是链接到web/codecatsfront/ src/CodeCats/FrontBundle/Resources/public/images/的图像。
我还尝试了命令:
app/console liip:imagine:cache:resolve php-bg.png它可以工作,这是我对这个包的额外配置:
liip_imagine:
resolvers:
default:
web_path: ~
filter_sets:
cache: ~
my_thumb:
quality: 75
filters:
thumbnail: { size: [120, 90], mode: outbound }发布于 2014-07-02 21:18:49
应该去掉"asset()“函数。
<img src="{{ 'bundles/codecatsfront/images/python-bg.png' | imagine_filter('my_thumb') }}" alt="...">它能解决这个问题吗?
https://stackoverflow.com/questions/23572719
复制相似问题