LiipImagineBundle thumbnails not working

I'm just trying to work with LiipImagineBundle.

Ok, all i got so far:

  • Installed using composer
    • $ php composer.phar requires "liip / imag-bundle: dev-master"
  • Included package in AppKernel.php
    • new Liip \ ImagineBundle \ LiipImagineBundle (),
  • Added to routing.yml
    • _imagine way
  • Added liip_imagine filter in config.yml

    Checked with php app / console router: debug and path _imagine_my_thumb exist.

But after use:

<img src="{{ '/relative/path/to/image.jpg' | imagine_filter('my_thumb') }}" />

the image is not displayed, the path simply was not found.

prod.log says Route _imagine_my_thumb does not exist, although it exists because it is displayed using router: debug for both environments.

Any tips?

+5
source share
2

, '/relative/path/to/image.jpg' ? , .

:

liip_imagine:
    driver:               gd
    web_root:             %kernel.root_dir%/../web
    data_root:            %kernel.root_dir%/../app
    cache_mkdir_mode:     0777
    cache_prefix:         /media/cache
    cache:                web_path
    cache_clearer:        true
    data_loader:          filesystem
    controller_action:    liip_imagine.controller:filterAction
    formats:              []
    filter_sets:
        avatar:
            filters:
                thumbnail: { size: [40, 40], mode: outbound }
        profile:
            filters:
                relative_resize: { widen: 500 }

HTML:

<img src="{{ 'uploads/images/filename.jpg' | imagine_filter('avatar') }}" alt="image">
enter code here

routing.yml:

_imagine:
    resource: .
    type:     imagine

. (.: data_root)

0

, php_fileinfo php.ini .

0

All Articles