I have just installed AvalancheImagineBundle in Symfony
and I am trying to convert Image to Thumbnail but its not working..
<img src="{{'/hrms/web/uploads/profileimage/8999226bcc8341dc7e076eb09226f8521bbac106.jpeg'|apply_filter('my_thumb')}} " />
Here is my config file ..
avalanche_imagine:
filters:
my_thumb:
type: thumbnail
options: { size: [120, 90], mode: outbound }
routing file as follows..
_imagine:
resource: .
type: imagine
I am getting this as HTML
<img src="/hrms/web/app_dev.php/media/cache/my_thumb/hrms/web/uploads/profileimage/8999226bcc8341dc7e076eb09226f8521bbac106.jpeg }}">
I have not created any folders is it necessary..? help me..
If I remove hrms/web/ from image url it is working..
hello i use AvalancheImagineBundle
my config and route is same as you but i get my img src in another way and you haven't to create any folder ex :
config :
avalanche_imagine:
filters:
my_big_banner:
type: relative_resize
options: { widen: 940, format: jpg, quality: 100 }
routing :
_imagine:
resource: .
type: imagine
HTML :
<img id="big-bannerImgShow" style="background-image: url('{{ (entity.evenImage.webPath) | apply_filter('my_big_banner')}}')">
i hope this help you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.