fusic / imgin
v0.1.2
2019-04-03 00:43 UTC
Requires
- php: >=5.3.2
- aws/aws-sdk-php: 3.*
- composer/installers: v1.0.21
- doctrine/cache: 1.4.0
- imagine/imagine: *
- nategood/commando: 0.2.7
Requires (Dev)
- phpunit/phpunit: 4.*
README
安装
$ composer -sdev create-project fusic/imgin ./app/webroot/img ... Writing lock file Generating autoload files Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? Y $ chmod 777 ./app/webroot/img
使用(文件)
$ cp config.localfile.php config.php
原始图像访问
/img/foo/bar/large.jpg
缩放缓存图像访问
/img/100x120/foo/bar/large.jpg
清除缓存图像
$ php app/webroot/img/imgin.php clearcache /path/to/app/webroot/img/foo/bar/large.jpg
清除所有缓存图像
$ php app/webroot/img/imgin.php clearcache --all
使用(S3)
$ cp config.s3.php config.php
请根据您的环境编辑config.php中的aws身份验证信息。
原始图像
https://s3-ap-northeast-1.amazonaws.com/s3-bucket-name/foo/bar/large.jpg
原始“缓存”图像访问
/img/foo/bar/large.jpg
缩放缓存图像访问
/img/100x120/foo/bar/large.jpg
清除缓存图像
$ php app/webroot/img/imgin.php clearcache /path/to/app/webroot/img/foo/bar/large.jpg
清除所有缓存图像
待办事项
要求
许可
MIT许可下