定制 ozden/imageconverter 二次开发

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

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

ozden/imageconverter

最新稳定版本:1.2

Composer 安装命令:

composer require ozden/imageconverter

包简介

imageconverter is a S3 Image converter

README 文档

README

You can convert easily that you have uploaded jpg or png images to webp format on AWS S3. In this way, you'll use less bandwidth and storage area.

Installation

Install with composer

composer require ozden/imageconverter

Usage/Examples

<?php
require 'vendor/autoload.php';
set_time_limit(0);
ini_set('memory_limit', '-1');

$awsCredentials = [
    'key' => 'YOUR_AWS_KEY',
    'secret' => 'YOUR_AWS_SECRET'
];

$converter = new Ozden\Converter();
$converter->setRegion('YOUR_REGION');
$converter->setBucket('YOUR_BUCKET');
$converter->connectAws($awsCredentials);

// S3 Prefix. (If you don't want to use prefix, then leave empty first argument)
// You want to convert extensions. Array
// Webp quality. 0-100. 0: worst, 100: best
// If you set true, the script will delete old jpg/png file on your S3 after upload webp file.

$result = $converter->start('backup/2022/07/', ['jpg', 'jpeg', 'jfif', 'png', 'webp'], 70, false);
var_dump($result);

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-25