mael/intervention-image-bundle
最新稳定版本:1.0.1
Composer 安装命令:
composer require mael/intervention-image-bundle
包简介
Simple intervention/image integration for symfony projects
README 文档
README
Simple integration for use intervention/image in Symfony project
Requirements
- PHP 7.1
- Symfony >= 4.4
- FileInfo Extension
- GD Library (>= 2.0) or Imagick PHP Extension (>= 6.5.7)
Installation
Run this command in your terminal :
composer require mael/intervention-image-bundle
Answer yes for mael/intervention-image-bundle
Configuration
Register the bundle in your config/bundles.php
Mael\InterventionImageBundle\MaelInterventionImageBundle::class => ['all' => true]
You can chose the driver for image manipulation in config/packages/mael_intervention_image.yaml
mael_intervention_image: driver: gd ## GD or imagick; Default is GD
Usage
use \Mael\InterventionImageBundle\MaelInterventionImageManager; class Foo { public function makeImage(MaelInterventionImageManager $imageManager) { $newImage = $imageManager->make('public/uploads/bar.jpg')->resize(1200, 500); } }
attention, your directory must have permission to write a file
Refer to the intervention/image documentation to know the different options available to manipulate the images.
License
This bundle is under MIT license
统计信息
- 总下载量: 3.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-15