我目前正在使用vich_uploader将文件上传到S3(这可以正常工作)。但是现在我还想申请一些liip_imagine filter_sets,当前的config.yml看起来像:
liip_imagine:
loaders:
loader_aws_s3_images:
flysystem:
filesystem_service: oneup_flysystem.awss3v3_filesystem
resolvers:
profile_photos:
flysystem:
filesystem_service: oneup_flysystem.awss3v3_filesystem
root_url: "%s3_directory%"
cache_prefix: media/cache
visibility: public
filter_sets:
cache: ~
179x151:
filters:
thumbnail: { size: [179, 151], mode: inset }
50x50:
filters:
thumbnail: { size: [50, 50], mode: inset }
oneup_flysystem:
adapters:
upload_adapter:
awss3v3:
client: ct_file_store.s3 #this needs to match the "service" you defined above
# service_id: client.s3
bucket: %aws_s3_bucket%
prefix: ~
filesystems:
awss3v3:
adapter: upload_adapter
mount: prefix
vich_uploader:
db_driver: orm
storage: flysystem
mappings:
profile_pics:
# uri_prefix: https://s3.eu-central-1.amazonaws.com/%aws_s3_bucket% # you'll need this set to use the Vich URL generator
upload_destination: prefix
# upload_destination: %kernel.root_dir%/../web/images/profile_pics
namer: vich_uploader.namer_uniqid
delete_on_remove: true
delete_on_update: true
project_docs:
# uri_prefix: https://s3.eu-central-1.amazonaws.com/%aws_s3_bucket% # you'll need this set to use the Vich URL generator
upload_destination: prefix
# upload_destination: %kernel.root_dir%/../web/images/profile_pics
namer: vich_uploader.namer_uniqid
delete_on_remove: true
delete_on_update: true
composer.json:
"liip/imagine-bundle": "@stable",
"aws/aws-sdk-php": "@stable",
"oneup/flysystem-bundle": "@stable",
"league/flysystem-aws-s3-v3": "@stable"
目前我得到Source image could not be found
我试图创建自定义解析器/加载器以从S3读取,但没有成功。