marcandreappel/imagecache
Composer 安装命令:
composer require marcandreappel/imagecache
包简介
Image resizing and caching
README 文档
README
Fast image handling and caching.
$imageCache = new \MarcAndreAppel\ImageCache\ImageCache('/absolute/path/to/base_folder/images'); // Create a scaled and cropped thumbnail and return the public thumbnail path $thumbnail = $imageCache->thumbnail(50, 50)->cachedImage;
Methods (chainable)
Cache path naming override
$imageCache->method('replacement')->thumbnail(50, 50)->publicPath;
Returns /.cache/replacement instead of /.cache/thumbnail/50/50.
Cache path prefixing
$imageCache->prefix('mycache')->thumbnail(50, 50)->publicPath;
Adds /.cache/mycache to the resulting path, eg: /.cache/mycache/thumbnail/50/50.
Allow enlarging of images
$imageCache->enlarge(true)->scale(1200);
Original size might be 400px ✕ 300px and hence becomes bigger.
Create visible subfolders
$imageCache->hidden(false)->scale(1200);
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2018-08-06