avalanche123/AvalancheImagineBundle — Issue #38: Add more easy to use thumb tags
Author: zhil
Created: 2011-10-23 14:11:01+00:00
State: open

Right now I have configuration like

avalanche_imagine:
web_root: %kernel.root_dir%/../web
cache_prefix: media/cache
driver: gd
filters:
637_355:
type: thumbnail
options: { size: [637, 355], mode: outbound }
640_360:
type: thumbnail
options: { size: [641, 360], mode: outbound }
289_214:
type: thumbnail
options: { size: [289, 214], mode: outbound }
75_64:
type: thumbnail
options: { size: [75, 64], mode: outbound }
152_128:
type: thumbnail
options: { size: [152, 128], mode: outbound }
152_94:
type: thumbnail
options: { size: [152, 94], mode: outbound }
47_47:
type: thumbnail
options: { size: [47, 47], mode: outbound }
115_65:
type: thumbnail
options: { size: [115, 65], mode: outbound }
30_30:
type: thumbnail
options: { size: [30, 30], mode: outbound }
20_20:
type: thumbnail
options: { size: [20, 20], mode: outbound }

and in my code I use code like

{{ article_screenshot(magazineArticle) | apply_filter("152_94")}}

My question is - whats point of the creation entries in config?
everything would be simpler with implementation like

{{ article_screenshot(magazineArticle) | thumb(152,94)}}

and no configuration.

Is it possible? :)