Symfony : Liip imagine with AWS S3 doesn't work

I have a problem on Symfony 5. For two days I’m using AWS S3 to stock my images and my documents.
I use also VichImage to upload.
If I use VichImage + Gaufrette + AWS S3, it’s working (with a public bucket, not a private).

But if I want to use Liip imagine for the filters, it doesn’t work.

How to configure Liip imagine to connect it with AWS S3 please ?

services.yaml :

    app.manager.amazon_s3:
        class: Aws\S3\S3Client
        factory: [Aws\S3\S3Client, 'factory']
        arguments:
            -
                version: '2006-03-01'
                region: 'eu-west-3'
                credentials:
                    key: '%env(AWS_KEY)%'
                    secret: '%env(AWS_SECRET_KEY)%'

    app.imagine.cache.resolver.amazon_s3:
        class: Liip\ImagineBundle\Imagine\Cache\Resolver\AwsS3Resolver
        arguments:
            - "@app.manager.amazon_s3"
            - '%env(AWS_BUCKET_NAME)%'
            - "public-read"
            - { Scheme: https }
            - { CacheControl: "max-age=86400" }
        tags:
            - { name: "liip_imagine.cache.resolver", resolver: "amazon_s3" }

liip imagine :

liip_imagine:
    # valid drivers options include "gd" or "gmagick" or "imagick"
    driver: "gd"
    cache: amazon_s3

    resolvers:
        amazon_s3:
            aws_s3:
                client_config:
                    credentials:
                        key: '%env(AWS_KEY)%'
                        secret: '%env(AWS_SECRET_KEY)%'
                    region: 'eu-west-3'
                    bucket: '%env(AWS_BUCKET_NAME)%'
                    version: '2006-03-01'
                bucket: '%env(AWS_BUCKET_NAME)%'
                # cache: true
                get_options:
                    Scheme: https
                put_options:
                    CacheControl: "max-age=86400"

vich :

vich_uploader:
    db_driver: orm
    twig: true
    storage: gaufrette

    mappings:
        photos:
            uri_prefix: '%env(AWS_BASE_URL)%/uploads/utilisateurs'
            upload_destination: photos_fs
            namer: Vich\UploaderBundle\Naming\SmartUniqueNamer
            inject_on_load: true
            delete_on_update: true
            delete_on_remove: true

        documents:
            uri_prefix:  '%env(AWS_BASE_URL)%/uploads/documents'
            upload_destination: documents_fs
            namer: Vich\UploaderBundle\Naming\SmartUniqueNamer
            inject_on_load: true
            delete_on_update: true
            delete_on_remove: true

gaufrette :

knp_gaufrette:
    stream_wrapper: ~
    adapters:
        photos_adapter:
            aws_s3:
               service_id: 'app.manager.amazon_s3'
               bucket_name: '%env(AWS_BUCKET_NAME)%'
               detect_content_type: true
               options:
                   create: true
                   directory: uploads/utilisateurs

        documents_adapter:
            aws_s3:
                service_id: 'app.manager.amazon_s3'
                bucket_name: '%env(AWS_BUCKET_NAME)%'
                detect_content_type: true
                options:
                    create: true
                    directory: uploads/documents

    filesystems:
        photos_fs:
            adapter: photos_adapter

        documents_fs:
            adapter: documents_adapter

and my twig code :

          <img src="{{ vich_uploader_asset(bien, 'photo')  | imagine_filter('photo_bien') }}" class="photo-bien">

Thank’s !

Hi @kevoliva

Thanks for being a part of the GitHub community! We’re glad you’re here.

I wanted to jump in and mention that if you’re looking for help for this specific topic, you might want to try asking for help somewhere that focuses on Symfony. It’s definitely possible that another GitHub user might have run into this same issue and can help, but the GitHub Community Forum focuses primarily on topics related to GitHub itself or collaboration on project development and ideas. We want to make sure you’re getting the best support you can, but this forum may not be the right place for this particular topic.

Best of luck!