eleven-miles/iris
Composer 安装命令:
composer require eleven-miles/iris
包简介
A PHP WordPress package that converts images to webP on upload; by default.
README 文档
README
Requirements
This package can be used with WordPress 5.8 and forward, due to WebP support being introduced. This package enables servers to directly process and convert JPEG or PNG files on upload as well as bulk and single image conversions via WP CLI.
Setup
This package is installed using Composer.
Run composer require eleven-miles/iris to install.
CLI Commands
Bulk Conversion
Use wp iris to run a full media library conversion. This will run through all JPG and PNG attachments and convert them to webp. This process uses Action Scheduler to queue up each conversion and wait until each is complete to progress.
Single Conversion
Use wp iris-id $id to run a single image conversion. This command takes an attachment ID as an argument and then runs a webp conversion on the single image.
Dependancies
Iris requires the two following plugins to be installed and activated.
Action Scheduler
Iris uses Action Scheduler to run webp convertion at scheduled intervals. This functionality helps when converting media libraies, and when images are uploaded in bulk. The GD image processing can have memory issues when bulk uploading images and return failed conversion. Action Scheduler helps to ensure that all images are converted by queuing up the conversions.
Offload Media
Iris uses Offload Media to store converted images in the cloud. During the Iris process the following Offload method - Media_Library_Item::get_by_source_id - is used to check if the attachement exists in the relevant storage system (eg AWS S3 bucket).
Debugging
For debugging: Debug::debug($image_meta);
eleven-miles/iris 适用场景与选型建议
eleven-miles/iris 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.99k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2022 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 eleven-miles/iris 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 eleven-miles/iris 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-15