alimi7372/webp-convertor
最新稳定版本:v1.1.2
Composer 安装命令:
composer require alimi7372/webp-convertor
包简介
A utility Laravel package to convert images to WebP format
README 文档
README
This package allows you to convert images to WebP format and reduce their file size in your Laravel application.
Installation
You can install the package via composer:
composer require yourname/laravel-webp
Usage
To convert an image to WebP format, use the following:
use Alimi7372\Webp\WebpService; app('webp')->convert($imagePath, $outputPath);
Running Tests
To run the tests for this package, simply use:
composer test
Facade Usage
This package includes a Facade for easier usage. You can use the WEBP::convert() method to convert images to WebP format.
Example:
use Alimi7372\Webp\Facades\WebpFacade as WEBP; WEBP::convert($imagePath, $outputPath, 75);
Helpers
This package includes a helper function convert_to_webp to simplify the conversion of images to WebP format:
convert_to_webp($imagePath, $outputPath, 75);
统计信息
- 总下载量: 213
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-18