giko / image-bundle
Giko Image Resize Bundle
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- sonata-project/media-bundle: >=2.1,<2.5-dev
- symfony/framework-bundle: 2.*
This package is not auto-updated.
Last update: 2024-11-09 18:27:29 UTC
README
本组件可用于图片缩放,通过URL参数,即可加载不同尺寸的图片。同时支持紫铜的@2x, @3x图片。
组件仅支持Symfony2.7+
安装
============
Step 1. 将本组件 giko/image-bundle
和 sonata-project/media-bundle
添加到 composer.json
文件:
"require": {
#...
"sonata-project/media-bundle": "dev-master",
"giko/image-bundle": "dev-master",
}
Step 2. 在应用内核代码中注册组件:
//app/AppKernel.php public function registerBundles() { return array( // ... new Giko\ImageBundle\GikoImageBundle(), // ... ); }
Step 3. Sonata Media的相关配置步骤,请参见Sonata Media文档:
Step 4. 增加Route
giko_image:
resource: "@GikoImageBundle/Resources/config/routing.yml"
prefix: /