加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

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

发布时间:2020-12-13 22:54:21 所属栏目:PHP教程 来源:网络整理
导读:我有这个配置: 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 }
我有这个配置:

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: Unrecognized options “path” under
“liip_imagine.filter_sets.subitem_in_category”

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

解决方法

之前删除了这些功能,因为有关组件依赖性的设计不佳. 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

否则,您可以使用捆绑的旧分支.

希望这有帮助

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读