Reputation: 1023
I want to user liip/LiipImagineBundle
for vich/uploader-bundle
as per documents. I installed packages and configured them in Symfony 5.
But showing error: Could not find configuration for a filter
Here is my composer.json
:
...
"doctrine/orm": "^2.7",
"liip/imagine-bundle": "^2.3",
"symfony/framework-bundle": "5.0.*",
"vich/uploader-bundle": "^1.15"
...
Config file: config/packages/liip_imagine.yaml
liip_imagine:
# valid drivers options include "gd" or "gmagick" or "imagick"
driver: gd
resolvers:
default:
web_path:
web_root: '%kernel.project_dir%/public/uploads/products'
cache_prefix: imagine/cache
filter_sets:
filters:
cache: ~
avatar:
quality: 75
cache: ~
filters:
thumbnail:
size:
- 120
- 120
mode: outbound
post_processors: { }
loaders:
default:
filesystem:
locator: filesystem
data_root:
- '%kernel.project_dir%/public/uploads/products'
allow_unresolvable_data_roots: false
bundle_resources:
enabled: false
access_control_type: blacklist
access_control_list: { }
cache: default
cache_base_path: ''
data_loader: default
default_image: null
default_filter_set_settings:
quality: 100
jpeg_quality: null
png_compression_level: null
png_compression_filter: null
format: null
animated: false
cache: null
data_loader: null
default_image: null
filters: { }
post_processors: { }
controller:
filter_action: 'Liip\ImagineBundle\Controller\ImagineController::filterAction'
filter_runtime_action: 'Liip\ImagineBundle\Controller\ImagineController::filterRuntimeAction'
redirect_response_code: 301
enqueue: false
templating: true
and route file : config/routes/liip_imagine.yaml
_liip_imagine:
resource:
"@LiipImagineBundle/Resources/config/routing.yaml"
ERROR: "Could not find configuration for a filter"
how do I solve this?
Upvotes: 0
Views: 1227
Reputation: 1
I am working with liip_imagine on a symfony 5.3 project and I found that my configuration in yaml is slighty different. I hope this can help you.
liip_imagine:
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/public"
cache_prefix: "images/cache"
loaders:
default:
filesystem:
data_root: "uploads/images/"
bundle_resources:
enabled: true
driver: "gd"
data_loader: default
default_image: null
controller:
filter_action: liip_imagine.controller:filterAction
filter_runtime_action: liip_imagine.controller:filterRuntimeActio
filter_sets:
I created the folders manually in my case. The file in twig should be something like {{ asset(imagename.jpg) }} as the yaml will resolve the path for you.
I hope it helps you
regards.
Upvotes: -1