LiipImagineBundle:应用过滤器后更改保存图像的路径

时间:2015-01-07 22:24:04

标签: symfony liipimaginebundle php-imagine

我有这个配置:

liip_imagine:
    resolvers:
        default:
            web_path: ~

    filter_sets:
        cache: ~
        subitem_in_category: 
            path: ~  ///how to change the default path where the images are saved?
            filters:
                my_custom_filter: { }
                relative_resize: { heighten: 210 }

我试图更改保存图像的目录名称,但我得到了

  

InvalidConfigurationException:无法识别的选项" path"下   " liip_imagine.filter_sets.subitem_in_category"

我读过这个:https://github.com/liip/LiipImagineBundle/blob/master/Resources/doc/configuration.md

1 个答案:

答案 0 :(得分:1)

之前删除了这些功能,因为有关组件依赖性的设计不好。 See this pull request for further motivations about this.

对于相同的功能建议配置多个解析器,如here所述:

liip_imagine:
  resolvers:
      foo:
        web_path:
          cache_prefix: foo
      bar:
        web_path:
          cache_prefix: bar
  filter_sets:
    foo:
      cache: foo
    bar:
      cache: bar

否则你可以使用捆绑的旧分支。

希望这个帮助