I'm using liipImagineBundle but I can't get it work. Everything is installed correctly, but when I try to apply a filter the resolver doesn't create the image.
<img src="{{ asset('bundles/xy/uploads/images/default/default.png') | imagine_filter('thumb_50x50') }}" />
The generated html code:
<img src="http://social.lh.com/app_dev.php/media/cache/resolve/thumb_50x50/bundles/xy/uploads/images/default/default.png">
If I open a console and call
php app/console liip:imagine:cache:resolve bundles\xy\uploads\images\default\default.png
it works fine after that, because the /media/cache/......./default.png is created now. But I don't want to call it from the console everytime I upload a picture that needs a thumbnail.
I tried to get it done from the controller with:
$imagemanagerResponse = $this->container
->get('liip_imagine.controller')
->filterAction(
$this->getRequest(),
'bundles\xy\uploads\images\default\default.png',
'thumb_50x50'
);
But then I get the error: Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)
It is strange, because I enabled that extension in php.ini.
Does anyone have any suggestions? Are there any other method is symfony2 to create a thumbnail of a picture?
Your code is good, try investigating by:
Hope this help