icybee/module-thumbnailer
Composer 安装命令:
composer require icybee/module-thumbnailer
包简介
Creates thumbnails on demand.
关键字:
README 文档
README
The Thumbnailer module (thumbnailer) creates thumbnails from images and managed
images using options or configured versions.
The module extends the Image active record with the thumbnail() method and the thumbnail
lazy getter, and provides an interface to configure and manage its cache that integrates with the
unified cache system of the "Cache" module (cache). The module also extends the core object
with the thumbnail_versions lazy getter.
<?php namespace ICanBoogie\Modules\Thumbnailer; $versions = $app->thumbnailer_versions; $versions['popover'] = [ 'width' => 420, 'height' => 340 ]; # or $versions['popover'] = 'w:420;h:340'; # or $versions['popover'] = '{"w":"420","h":"340"}'; # or $versions['popover'] = '420x340'; $thumbnail = new Thumbnail('/images/madonna.jpeg', 'popover'); echo $thumbnail; // <img src="/api/thumbnail/420x340/fill?s=%2Fimages%2Fmadonna.jpeg&v=popover" alt="" width="420" height="340" class="thumbnail thumbnail--popover" /> echo $thumbnail->url; // /api/thumbnail/420x340/fill?s=%2Fimages%2Fmadonna.jpeg&v=popover $thumbnail = new Thumbnail('/images/madonna.jpeg', '64x64.png'); echo $thumbnail; // <img src="/api/thumbnail/64x64/fill.png&s=%2Fimages%2Fmadonna.jpeg" alt="" width="64" height="64" class="thumbnail" /> echo $thumbnail->url; // /api/thumbnail/64x64/fill.png&s=%2Fimages%2Fmadonna.jpeg
Event hooks
ICanBoogie\Modules\System\Cache\CacheCollection::alter
Adds our cache manager to the cache collection.
Icybee\ConfigBlock::alter_children
Adds a thumbnails section to the config block of modules defining thumbnail versions using the "thumbnails" config.
Icybee\Operation\Module\ConfigOperation::properties:before
Pre-parses defined thumbnail versions before the config is saved.
Prototype methods
ICanBoogie\Core\get_thumbnail_versions
Adds the thumbnail_versions lazy getter to the core object. The getter returns a version
collection configured with the versions saved in the registry. Third parties may alter this
collection with an event hook attached to the ICanBoogie\Modules\Thumbnailer\Versions::alter
event.
Requirements
The package requires PHP 5.5 or later.
Installation
The recommended way to install this package is through Composer:
$ composer require icybee/module-thumbnailer
Cloning the repository
The package is available on GitHub, its repository can be cloned with the following command line:
$ git clone https://github.com/Icybee/module-thumbnailer.git thumbnailer
Testing
The test suite is ran with the make test command. Composer is
automatically installed as well as all the dependencies required to run the suite. The package
directory can later be cleaned with the make clean command.
The package is continuously tested by Travis CI.
Documentation
The package is documented as part of the Icybee CMS
documentation. The documentation for the package and its
dependencies can be generated with the make doc command. The documentation is generated in
the docs directory using ApiGen. The package directory can later by
cleaned with the make clean command.
License
This module is licensed under the New BSD License - See the LICENSE file for details.
icybee/module-thumbnailer 适用场景与选型建议
icybee/module-thumbnailer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 774 次下载、GitHub Stars 达 0, 最近一次更新时间为 2012 年 12 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「thumbnail」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 icybee/module-thumbnailer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 icybee/module-thumbnailer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 icybee/module-thumbnailer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PHP library for fetching thumbnails from a URL
A Gokaru storage & thumbnail server PHP client
Yii2 Glide Extension
thumbnail
Customizable thumbnail generator for Laravel. From s3 to local disk. Minimize size of your images!
A Pimcore plugin that provides a button to get absolute Thumbnail URLs
统计信息
- 总下载量: 774
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2012-12-29