【问题标题】:avlancheimagine bundle not generating imagesavlancheimagine 捆绑包不生成图像
【发布时间】:2014-12-23 16:27:04
【问题描述】:

我刚刚在 Symfony 中安装了 AvalancheImagineBundle

我正在尝试将图像转换为缩略图,但它不起作用..

<img  src="{{'/hrms/web/uploads/profileimage/8999226bcc8341dc7e076eb09226f8521bbac106.jpeg'|apply_filter('my_thumb')}} " />

这是我的配置文件..

avalanche_imagine:

filters:
    my_thumb:
        type:    thumbnail
        options: { size: [120, 90], mode: outbound }

路由文件如下..

_imagine:
    resource: .
    type:     imagine

我将其作为 HTML 格式获取

<img src="/hrms/web/app_dev.php/media/cache/my_thumb/hrms/web/uploads/profileimage/8999226bcc8341dc7e076eb09226f8521bbac106.jpeg }}">

我还没有创建任何文件夹是否有必要..? 帮帮我..

如果我从图像 url 中删除 hrms/web/ 它正在工作..

【问题讨论】:

    标签: php image symfony resize thumbnails


    【解决方案1】:

    你好,我使用 AvalancheImagineBundle

    我的配置和路由和你一样,但是我用另一种方式得到我的 img src,你没有创建任何文件夹 ex :

    配置:

    avalanche_imagine:
        filters:
            my_big_banner:
                type:    relative_resize
                options: { widen: 940, format: jpg, quality: 100  }
    

    路由:

    _imagine:
        resource: .
        type:     imagine
    

    HTML:

    <img id="big-bannerImgShow" style="background-image: url('{{ (entity.evenImage.webPath) | apply_filter('my_big_banner')}}')">
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-19
      • 1970-01-01
      • 2018-05-19
      • 1970-01-01
      • 2017-11-20
      • 2018-06-24
      • 2013-05-03
      • 2013-10-01
      相关资源
      最近更新 更多