Liipimaginebundle: Add support for Symfony 5

Created on 22 Nov 2019  路  7Comments  路  Source: liip/LiipImagineBundle

Symfony 5 is out since yesterday

Most helpful comment

Everything is prepared for this one, and I hope that we will soon be able to support Symfony 5. Currently blocked by other packages, which there are open MR's for 馃憤

All 7 comments

Everything is prepared for this one, and I hope that we will soon be able to support Symfony 5. Currently blocked by other packages, which there are open MR's for 馃憤

Hello, what is the status of it?

work has been started in #1246

if you want to contribute, please take the symfony5 branch, rebase it on master to solve conflicts, and then add further changes to get the build green (e.g. allowing enqueue 0.10)

Done and released in 2.3.0!

Not that simple to use it with symfony 5...or am i doing wrong ? probably :-)
I tried here : https://symfony.com/doc/2.0/bundles/LiipImagineBundle/basic-usage.html

But i don't even have a config.yaml in my config folder...

@Aruno-Dev
if you installed the bundle via composer, you got a new file config/packages/liip_imagine.yaml automatically. that is the new "config". but you can create that file also by yourself.

Here an example:

# config/packages/liip_imagine.yaml
liip_imagine:
    # valid drivers options include "gd" or "gmagick" or "imagick"
    driver: 'imagick'

    # configure resolvers
    resolvers:

        # setup the default resolver
        default:

            # use the default web path
            web_path:
                web_root: '%kernel.project_dir%/public'
                cache_prefix: 'media'

    loaders:
        default:
            filesystem:
                data_root: "%kernel.project_dir%/public"


    # your filter sets are defined here
    # sets the desired resize method: 'outbound' crops the image as required,
    # while 'inset' performs a non-cropping relative resize.
    filter_sets:
        detail:
            filters:
                relative_resize: { heighten: 1080 }
                strip: ~

        square:
            quality: 75
            filters:
                upscale: { min: [770, 770] }
                thumbnail: { size: [770, 770], mode: 'outbound' }
                strip: ~

        # use the default cache configuration
        cache: ~

Thank you very much for your plain and simple answer ! I am quite new in web development and it's been 3 weeks now i learn to use symfony. It is very interesting but sometimes a bit confusing. I realise now that the liipImagineBundle is not exactly what i hoped it was. I am only trying to resize images just before uploading them. Liip is probably a good option but i am using a html-responsive template for a photography portfolio website and when my uploaded images rersolution is more than 2000px the render get dirty...So i tried to resize my images to 1500px x 1000px (approximatively) on a imageresizer website before i upload them and it is perfect but i want to keep my mental sanity and not do the same action for hundreds of pictures to put on the photography website. So i would like it to be done 'automatically' on upload. I hope my explanations are quite clear. You don't have to answer it anyway, this is not the place. I just wanted to explain. Thanks again !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stephanvierkant picture stephanvierkant  路  6Comments

tobias-r picture tobias-r  路  4Comments

pamil picture pamil  路  6Comments

weyandch picture weyandch  路  5Comments

ghost picture ghost  路  5Comments