PHPackages                             hzz/free-pic - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. hzz/free-pic

ActiveLibrary[File &amp; Storage](/categories/file-storage)

hzz/free-pic
============

free pic 免费图床 | 无存储限制 | 无需上传凭证 | 无同源跨域检测

0.1(3y ago)23384MITPHPPHP &gt;=5.6.0

Since Sep 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hezhizheng/free-pic)[ Packagist](https://packagist.org/packages/hzz/free-pic)[ RSS](/packages/hzz-free-pic/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

free-pic 一个第三方免费图床扩展包
---------------------

[](#free-pic-一个第三方免费图床扩展包)

> [体验demo](http://117.50.186.143:5000/)

> [github 地址](https://github.com/hezhizheng/free-pic)

> [packagist 地址](https://packagist.org/packages/hzz/free-pic)

feature
-------

[](#feature)

- 三无图床（"无存储限制" | "无需上传凭证" | "无同源跨域检测"）
- 简单易用、方便扩展
- 支持 常见 "gif", "jpeg", "jpg", "png" 图片格式

支持图床
----

[](#支持图床)

- [sm.ms](https://smms.app/)
- [imgBB](https://imgbb.com/upload)
- [FreeImageHost](https://freeimage.host/)
- [CatBox](https://catbox.moe)
- ...找到其他三无图床就再扩展

使用
--

[](#使用)

下载安装

```
composer require hzz/free-pic dev-master

```

上传图片到第三方图床 (完整调用过程)

```
// 配置项
$config = [
    'sm' => [ // sm 需要token ，不使用可无须配置
        "token" => "Yuc4fb0BuwsOnd4y7R0zFp0tVGkxYgRa22"
    ],
    'debug' => true,
    'log' => [
        'name' => 'img_hosting',
        'file' => __DIR__ . '/img_hosting.log',
        'level' => 'debug',
        'permission' => 0777,
    ],
];

$params = [
    "filepath" => "图片的绝对路径",
];
// 实例化
$freePic = new \Hzz\FreePic($config);
// 上传 , 同理 可用 ->sm , ->freeImageHost , ->catBox 调用对应的服务
$res = $freePic->imgBB->upload($params); // 这里返回的是对应图床服务器返回的上传结果数据。
// getUrl方法 可获取实际
$url = $freePic->imgBB->getUrl($res);
```

详细用法可参考 [tests](./tests/UploadTest.php) 用例 或 [upload.php](./tests/upload.php)

License
-------

[](#license)

[MIT](./LICENSE.txt)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e26dde6f13786901a1c998d31595d608171890d030caf51bb0dadee392dd961?d=identicon)[hezhizheng](/maintainers/hezhizheng)

---

Top Contributors

[![hezhizheng](https://avatars.githubusercontent.com/u/18096449?v=4)](https://github.com/hezhizheng "hezhizheng (23 commits)")

---

Tags

freeimage-hostingphppicture

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hzz-free-pic/health.svg)

```
[![Health](https://phpackages.com/badges/hzz-free-pic/health.svg)](https://phpackages.com/packages/hzz-free-pic)
```

###  Alternatives

[dmhendricks/file-icon-vectors

A collection of file type icons in SVG format.

37880.0k11](/packages/dmhendricks-file-icon-vectors)[barracudanetworks/archivestream-php

A library for dynamically streaming dynamic tar or zip files without the need to have the complete file stored on the server.

77196.8k1](/packages/barracudanetworks-archivestream-php)

PHPackages © 2026

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