我结合使用LiipImagineBundle 1.6.0
,一切正常,但他不保存缓存文件。图像保存正确,因此不存在.Symfony 3.1.3
VichUploaderBundle 1.2.0
dev
prod
VichUploaderBundle
配置.yml:
vich_uploader:
db_driver: orm # or mongodb or propel or phpcr
mappings:
pop_image:
uri_prefix: /images/pops
upload_destination: %kernel.root_dir%/../web/images/pops
ad_image:
uri_prefix: /images/ads
upload_destination: %kernel.root_dir%/../web/images/ads
liip_imagine:
resolvers:
default:
web_path: ~
filter_sets:
cache: ~
square:
quality: 75
filters:
thumbnail: { size: [400, 400], mode: outbound }
路由.yml:
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.xml"
枝条:
...
<div class="image">
<img src="{{ vich_uploader_asset(pop,'imageFile')|imagine_filter('square') }}" alt="{{ pop.question }}" width="100%" class="grayscale" />
<span class="image-question">{{ pop.question }}</span>
</div>
...