A
A
Alexander2014-04-10 09:24:33
symfony
Alexander, 2014-04-10 09:24:33

LiipImagineBundle not working?

I installed the bundle as described here - https://github.com/liip/LiipImagineBundle/
I display the image in the template < img src="{{ asset('/upload/images/47066.jpeg') }}" /> - everything is fine .
I add a filter: < img src="{{ asset('/upload/images/47066.jpeg') | imagine_filter('my_thumb') }}" />
or like this: < img src="'/upload/images/47066 .jpeg' | imagine_filter('my_thumb') }}" />
- doesn't show image, but src="/app_dev.php/media/cache/my_thumb/upload/images/47066.jpeg"
checked /media/cache/ folder - there is nothing.
Someone faced a problem? What can be wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2014-04-11
@neokortex

Found a problem - the problem was in routing.

A
Alexey Krichko, 2014-04-10
@sand_alkr

Here's an example why it didn't work for me:

location ~* ^.+.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|mid|midi|wav|bmp|rtf|js|html|flv|mp3)\$ {
               expires 7d;
        }

in nginx configs.
At the same time, previews were not generated with symptoms similar to yours.
This helped:
location ~ ^/media/cache/my_thumb/uploads/files/.+\.(png|jpeg|jpg|gif)\$ {
        try_files \$uri @rewriteapp;
}

location @rewriteapp {
        rewrite ^(.*)\$ /app.php/\$1 last;
}
try_files \$uri @rewriteapp;

A
Alexander, 2014-04-10
@neokortex

Doesn't look like cache. Varnish turned off, apc even turned off

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question