定制 hryvinskyi/image-binaries 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hryvinskyi/image-binaries

最新稳定版本:1.0.1

Composer 安装命令:

composer require hryvinskyi/image-binaries

包简介

Image processing binaries (cwebp, cavif, magick) for WebP and AVIF conversion

README 文档

README

Composer plugin that provides pre-compiled image processing binaries for WebP and AVIF conversion.

Included Binaries

Binary Description Source
cwebp WebP encoder from libwebp Google WebP
cavif AVIF encoder cavif-rs

Supported Platforms

  • linux-x64 - Linux x86_64
  • linux-arm64 - Linux ARM64/aarch64 (cwebp only, cavif needs compilation)
  • darwin-x64 - macOS Intel
  • darwin-arm64 - macOS Apple Silicon

Installation

Via Composer

composer require hryvinskyi/image-binaries

The binaries are automatically installed to vendor/bin/ during composer install/update.

Manual Installation

If automatic installation doesn't work, run:

vendor/bin/install-binaries

Options:

  • --force - Reinstall even if binaries already exist
  • --binary=NAME - Install only specific binary (cwebp or cavif)
  • --help - Show help message

Usage

After installation, binaries are available at:

vendor/bin/cwebp
vendor/bin/cavif

WebP Conversion

vendor/bin/cwebp input.png -q 85 -o output.webp

AVIF Conversion

vendor/bin/cavif input.png -Q 80 -o output.avif

For Package Maintainers

Downloading/Updating Binaries

To download the latest binaries for all platforms:

cd app/code/Hryvinskyi/ImageBinaries
./scripts/download-binaries.sh

This will populate the binaries/ directory with platform-specific executables.

Directory Structure

binaries/
├── linux-x64/
│   ├── cwebp
│   └── cavif
├── linux-arm64/
│   └── cwebp
├── darwin-x64/
│   ├── cwebp
│   └── cavif
└── darwin-arm64/
    ├── cwebp
    └── cavif

Binary Versions

Binary Version
libwebp (cwebp) 1.5.0
cavif-rs 1.5.5

License

MIT License

Author

Volodymyr Hryvinskyi volodymyr@hryvinskyi.com

统计信息

  • 总下载量: 79
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固