vdlp/oc-glide-plugin
Composer 安装命令:
composer require vdlp/oc-glide-plugin
包简介
Allows developers to easily manipulate images in October CMS powered websites.
README 文档
README
Glide is a wonderfully easy on-demand image manipulation library written in PHP. Its straightforward API is exposed via HTTP, similar to cloud image processing services like Imgix and Cloudinary. Glide leverages powerful libraries like Intervention Image (for image handling and manipulation) and Flysystem (for file system abstraction).
Requirements
- PHP 8.2 or higher
- PHP extensions:
- ext-exif
- October 4.1.x or higher
Installation
composer require vdlp/oc-glide-plugin
Configuration
To configure this plugin execute the following command:
php artisan vendor:publish --provider="Vdlp\Glide\ServiceProviders\GlideServiceProvider" --tag="config"
This will create a config/glide.php file in your app where you can modify the configuration.
Modify the environment file by adding the following lines:
GLIDE_IMAGE_DRIVER="gd"
GLIDE_SIGN_KEY="[YOUR SIGN KEY HERE]"
We recommend using a 128 character (or larger) signing key to prevent trivial key attacks. Consider using a package like CryptoKey to generate a secure key.
For more details about the security and why a sign key is used, check glide.thephpleague.com.
Add an url to your disk in the config/filesystem.php to display the images properly, for example:
...
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
+ 'url' => 'storage/app/',
],
],
...
Example
Here you can see some basic examples of how to use this plugin. Out of the box, the default configuration used is main.
<!-- URL: images/main/media/test.jpg?s=5ef7c430ebb5a3b0fbfce160ae6de275 -->
<img src="{{ 'media/test.jpg'|thumb() }}" />
<!-- URL: images/main/media/test.jpg?w=50&h=50&s=36b0575d9556f32e7e7a3bc2e551ccb2 -->
<img src="{{ 'media/test.jpg'|thumb({w: 50, h: 50}) }}" />
Questions? Need help?
If you have any question about how to use this plugin, please don't hesitate to contact us at octobercms@vdlp.nl. We're happy to help you. You can also visit the support forum and drop your questions/issues there.
vdlp/oc-glide-plugin 适用场景与选型建议
vdlp/oc-glide-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.47k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 vdlp/oc-glide-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vdlp/oc-glide-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2019-01-22