Skip to content

Instantly share code, notes, and snippets.

@5quinque
Created July 18, 2020 21:39
Show Gist options
  • Save 5quinque/d1b9fbe298e55185107ef15b5a045859 to your computer and use it in GitHub Desktop.
Save 5quinque/d1b9fbe298e55185107ef15b5a045859 to your computer and use it in GitHub Desktop.
# See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
liip_imagine:
enqueue: true
# valid drivers options include "gd" or "gmagick" or "imagick"
driver: "imagick"
resolvers:
# https://symfony.com/doc/2.0/bundles/LiipImagineBundle/cache-resolver/aws_s3.html
s3_cache:
aws_s3:
client_config:
credentials:
key: '%env(AWS_S3_KEY)%'
secret: '%env(AWS_S3_SECRET)%'
region: '%env(AWS_S3_REGION)%'
version: 'latest'
# https://github.com/aws/aws-sdk-php/issues/692#issuecomment-121731538
endpoint: 'https://%env(AWS_S3_ENDPOINT)%'
bucket_endpoint: true
bucket: '%env(AWS_S3_BUCKET)%'
get_options:
Scheme: https
put_options:
CacheControl: "max-age=86400"
default:
web_path:
cache_prefix: "/"
filter_sets:
cache: ~
# Strip EXIF information
jpeg:
cache: s3_cache
quality: 75
filters:
strip: ~
img:
cache: s3_cache
animated: true
thumb:
cache: s3_cache
quality: 75
png_compression_level: 8
animated: true
# list of transformations to apply (the "filters")
filters:
# create a thumbnail: set size to 120x120 and use the "outbound" mode
# to crop the image when the size ratio of the input differs
thumbnail: { size: [120, 120], mode: outbound }
# auto rotate the image using EXIF metadata
auto_rotate: ~
# https://symfony.com/doc/2.0/bundles/LiipImagineBundle/data-loader/flysystem.html
loaders:
flysystem_loader:
flysystem:
filesystem_service: oneup_flysystem.s3_filesystem
data_loader: flysystem_loader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment