eab/image-filter-bundle
最新稳定版本:0.9.4
Composer 安装命令:
composer require eab/image-filter-bundle
包简介
A bundle for eZ Publish that provides filters for use in image variations / aliases
README 文档
README
Summary
eZ Publish 5 bundle for image variation filters.
So far only 1 filter is provided: thumbnailgravityfilter/center.
Copyright
Based on Image aliases and filters in eZ Publish 5.4+. Many thanks Thiago for this useful tutorial!
License
Licensed under GNU General Public License 2.0
Requirements
Requires eZ Publish 5.4 or above.
Installation
- Either install using composer:
composer require --update-no-dev --prefer-dist eab/image-filter-bundle
or install the source as a submodule using git:
git submodule add https://github.com/eab-dev/ImageFilterBundle src/Eab/ImageFilterBundle
- Edit the function
registerBundles()inezpublish/EzPublishKernel.phpand add the line:
new Eab\ImageFilterBundle\EabImageFilterBundle(),
to the array of bundles. Save it.
Usage
- Configure your own image variations/aliases in your bundle's
image_variations.yml. For example:
system: default: image_variations: my_nice_thumbnail: reference: ~ filters: - { name: thumbnailgravityfilter/center, params: [300, 300] }
- Use in your templates:
{% set thumbnail_image = ez_image_alias( content.getField( 'image' ), content.versionInfo, 'my_nice_thumbnail') %}
<img class="responsive" src="{{ thumbnail_image.uri }}">
统计信息
- 总下载量: 353
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2015-11-03