PHPackages                             papajo/imgservice - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. papajo/imgservice

ActiveLibrary[Image &amp; Media](/categories/media)

papajo/imgservice
=================

17PHP

Since Mar 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Ulll/ImgService)[ Packagist](https://packagist.org/packages/papajo/imgservice)[ RSS](/packages/papajo-imgservice/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

ImgService
==========

[](#imgservice)

说明
--

[](#说明)

支持随时切换Qiniu、OSS、Local三种模式的图片读取、上传、裁剪服务

用法
--

[](#用法)

```
composer require "papajo/imgservice"

```

```
require __DIR__ . '/vendor/autoload.php';

use ImgService\ImgService;
use ImgService\Drivers\OssDriver;

$driver = new OssDriver('*************', '*****************', 'oss-cn-qingdao.aliyuncs.com');
$driver->setBucket('test')->setWebhost('http://test.oss-cn-qingdao.aliyuncs.com');

//$driver = new QiniuDriver('accessKey', 'accessSecret');
//$driver->setBucket('test');

//$driver = new LocalDriver('storePath');
//$driver->setBucket('test');

$serv = new ImgService($driver);
$filename = '/test/1.png';
$content  = file_get_contents('/Users/xy/Desktop/1.png');
$a = $serv->putObjectStream($filename, $content);
$b = $serv->reszieArray($filename, ["200","100"]);
$c = $serv->getInfo($filename);
var_dump($a,$b,$c);exit;
```

#### Response

[](#response)

```
bool(true)
array(2) {
  [200]=>
  array(3) {
    ["url"]=>
    string(97) "http://test.oss-cn-qingdao.aliyuncs.com/test/1.png?x-oss-process=image/resize,m_lfit,w_200"
    ["height"]=>
    string(3) "200"
    ["width"]=>
    string(3) "200"
  }
  [100]=>
  array(3) {
    ["url"]=>
    string(97) "http://test.oss-cn-qingdao.aliyuncs.com/test/1.png?x-oss-process=image/resize,m_lfit,w_100"
    ["height"]=>
    string(3) "100"
    ["width"]=>
    string(3) "100"
  }
}
array(4) {
  ["height"]=>
  string(3) "300"
  ["width"]=>
  string(3) "300"
  ["ext"]=>
  string(3) "png"
  ["bytes"]=>
  string(5) "79201"
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/235e62e08c72e239aab59716748500b8f602d91d9b014780adba49e9812f94f5?d=identicon)[papajo](/maintainers/papajo)

### Embed Badge

![Health badge](/badges/papajo-imgservice/health.svg)

```
[![Health](https://phpackages.com/badges/papajo-imgservice/health.svg)](https://phpackages.com/packages/papajo-imgservice)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
