Reputation: 12488
I installed AvalancheImagineBundle for Symfony 2.0.
Everything wen't fine except the fact that it doesnt' generate thumbnail images after this line;
<img src="{{ asset('uploads/apartments/4ef4be0edef4a.jpg') | apply_filter('my_thumb') }}" />
The image is there. I tried cutting out the apply_filter and the image gets shown.
The config is set fine aswell - I followed the basic instructions on the git page.
But the thumbnail doesnt appear in media/cache after page load. I have the folder structure there.
What could be the issue?
Upvotes: 1
Views: 1425
Reputation: 2509
try using
<img src="{{ asset('../uploads/apartments/4ef4be0edef4a.jpg') | apply_filter('my_thumb') }}" />
note the ../ in the path, this worked for me when I had the same issue, avalanche seems to need a relative url
Upvotes: 2
Reputation: 900
I came across an issue where the thumbnail wasn't being created. You may have a similar problem.
Background / Problem
My images were not being saved and no thumbnail was being displayed.
This was because latest version on AvalancheImagineBundle is not compatible with the Symfony2 Standard Edition available from symfony.com.
The latest commit changes some of the using statements. You can see if this is your problem by navigating to the image that is being displayed (in my case this was /uploads/media/4efc8d3e5c37d.png). Once there, if you get an error talking about 'Filesystem' do the following:
Solution
Instead of updating symfony2 I chose to use the version of AvalancheImagineBundle just before the latest commit. Find it here. Of course, you could alternatively update symfony2.
Upvotes: 1
Reputation: 1943
Remove the Assetic call..
Just pass the the image url to the apply_filter function..
Images are cached by ImagineBundle. you dont need asset() here.
Upvotes: 3