I use LiipImagineBundle 1.6.0
on Symfony 3.1.3
combined with VichUploaderBundle 1.2.0
and everything goes fine on dev
but on prod
he doesn't save cached files. Images are saving correctly so there is rather not a problem of VichUploaderBundle
.
config.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 }
routing.yml:
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.xml"
twig:
...
<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>
...