intervention/image-tempest
Composer 安装命令:
composer require intervention/image-tempest
包简介
Tempest framework integration of Intervention Image
README 文档
README
Tempest framework integration for Intervention Image
This package provides an integration to setup Intervention Image easily to your Tempest application with a publishable configuration.
Requirements
- Tempest >= 3.9
Installation
In your existing Tempest application you can install this package using Composer.
composer require intervention/image-tempest
Features
Although Intervention Image can be used with Tempest without this extension, this integration package includes the following features that make image interaction with the framework much easier.
Application-wide configuration
This integration package comes with a global configuration file that is recognized by Tempest. It is therefore possible to store the settings for Intervention Image once centrally and not have to define them individually each time you call the image manager.
The configuration file can be copied to the application with the following command.
php tempest install image
The call will publish the configuration file image.config.php to your local application. Here you can set the desired driver and its configuration options for Intervention Image.
The configuration files looks like this.
use Intervention\Image\Drivers\Gd\Driver as GdDriver; use Intervention\Image\Tempest\Config as ImageConfig; return new ImageConfig( /* |-------------------------------------------------------------------------- | Image Driver |-------------------------------------------------------------------------- | | Intervention Image supports “GD Library” and “Imagick” to process images | internally. Depending on your PHP setup, you can choose one of them. | | Included options: | - \Intervention\Image\Drivers\Gd\Driver::class | - \Intervention\Image\Drivers\Imagick\Driver::class | - \Intervention\Image\Drivers\Vips\Driver::class */ driver: \Tempest\env('IMAGE_DRIVER', GdDriver::class), /* |-------------------------------------------------------------------------- | Configuration Options |-------------------------------------------------------------------------- | | These options control the behavior of Intervention Image. | | - "autoOrientation" controls whether an imported image should be | automatically rotated according to any existing Exif data. | | - "decodeAnimation" decides whether a possibly animated image is | decoded as such or whether the animation is discarded. | | - "backgroundColor" Defines the default background & blending color. | | - "strip" controls if meta data like exif tags should be removed when | encoding images. */ autoOrientation: true, decodeAnimation: true, backgroundColor: 'ffffff', strip: false, );
You can read more about the different options for driver selection, setting options for auto orientation, decoding animations and background color.
Injecting Dependencies
The following code example shows how to inject an image manager into your controller. The instance has already been automatically configured according to the config file. Of course you are not limited to inject into controller.
use Intervention\Image\Format; use Intervention\Image\Interfaces\ImageManagerInterface; use Tempest\Router\Get; use Tempest\View\View; use function Tempest\View\view; final readonly class HomeController { public function __construct(private ImageManagerInterface $imageManager) { // } #[Get(uri: '/')] public function __invoke(): View { // process image $image = $this->imageManager ->decode('./example.jpg') ->scale(height: 300) ->encodeUsingFormat(Format::WEBP); return view('./home.view.php', dataUri: $image->toDataUri()); } }
Authors
This library is developed and maintained by Oliver Vogel
Thanks to the community of contributors who have helped to improve this project.
License
Intervention Image Tempest is licensed under the MIT License.
intervention/image-tempest 适用场景与选型建议
intervention/image-tempest 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 04 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「image」 「thumbnail」 「resize」 「gd」 「imagick」 「watermark」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 intervention/image-tempest 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 intervention/image-tempest 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 intervention/image-tempest 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Yii2 LightBox image galary widget uses Lightbox v2.10.0 by Lokesh Dhakar
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
A PHP library for fetching thumbnails from a URL
Image cache
The lireincore/imgcache integration for the Yii2 framework
The Yii2 extension uses jQuery PrettyPhoto and OwlCarousel js and makes image galary from php array of structure defined.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-18