digitalcorehub/tinypng-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

digitalcorehub/tinypng-laravel

最新稳定版本:v1.0.0

Composer 安装命令:

composer require digitalcorehub/tinypng-laravel

包简介

Tinypng Laravel Package

README 文档

README

tinypng-laravel is a Laravel package that provides an easy and seamless way to integrate the TinyPNG API into your Laravel application. This package allows you to compress, optimize, and resize images programmatically, ensuring faster load times and reduced storage usage.

Installation

You can install the package via composer:

composer require digitalcorehub/tinypng-laravel

You can publish the config file with:

php artisan vendor:publish // select TinypngLaravelServiceProvider

This is the contents of the published config file:

return [
      'api_key' => env('TINYPNG_API_KEY'),
];

Usage

use DigitalCoreHub\TinypngLaravel\Facades\TinypngLaravel;

TinypngLaravel::compressFromUrl("https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png", $outputPath);

TinypngLaravel::compressFromFile($inputPath, $outputPath);

TinypngLaravel::compressFromBuffer("base64", $outputPath);

TinypngLaravel::resize($inputPath, $outputPath, $options);

API Reference

Please see API Reference for details.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-17