PHPackages                             deluxcms/media - 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. deluxcms/media

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

deluxcms/media
==============

deluxcms media

v0.2(9y ago)023MIT

Since Dec 15Compare

[ Source](https://github.com/smister/deluxcms-media)[ Packagist](https://packagist.org/packages/deluxcms/media)[ RSS](/packages/deluxcms-media/feed)WikiDiscussions Synced today

READMEChangelogDependencies (3)Versions (3)Used By (3)

deluxcms-media for deluxcms
===========================

[](#deluxcms-media-for-deluxcms)

---

deluxcms-media是deluxcms中一个多媒体模块，主要是图片管理

安装
--

[](#安装)

可以通过composer安装

```
compser require deluxcms/deluxcms-media

```

配置
--

[](#配置)

在配置文件中添加media模块

```
	'modules' => [
        'media' => [
            'class' => 'deluxcms\media\Media',
            'webUrl' => 'http://delux.com:8080/', //*必须配置, 提供访问的域名
			'useController' => true, //使用时候控制器，一般后台管理时才开启
			//'webRoot' => '@frontend/web',  //保存的相对地址
			//'allowTypes' => ['image/gif', 'image/jpeg', 'image/png'], //允许的上传类型
			//'uploadDir' => 'uploads', //保存图片的文件夹 , 都是相对于webRoot
			//'thumbnailDir' => 'thumbnails', //缩略图的文件夹 , 都是相对于webRoot
			//'noImage' => '@vendor/deluxcms/media/source/images/no_picture.png', //找不到图片时显示的
        ],
    ],
```

使用
--

[](#使用)

利用ImageUtils生成缩略图，获取没有图片

```
	/**
	 * 获取图片缩略图
	 * @param string $image 图片地址
	 * @param int $width 缩略图的宽度
	 * @param int $height 缩略图的高度
	 * @param string $noImage 找不到图片时展示的图片
	 * @param string  $mode 裁剪还是填充，默认是填充
	*/
	\deluxcms\media\components\ImageUtils::thumbnail($image, $width = 100, $height = 100, $noImage = '', $mode = ImageInterface::THUMBNAIL_INSET)

	/**
	 * 读取默认图片(找不到图片 )
	 * @param string $image 图片地址
	 * @param int $width 缩略图的宽度
	 * @param int $height 缩略图的高度
	 * @param string  $mode 裁剪还是填充，默认是填充
	*/
	\deluxcms\media\components\ImageUtils::getNoImage($image = '', $width = 100, $height = 100, $mode = ImageInterface::THUMBNAIL_INSET)
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

3481d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6689189?v=4)[smister](/maintainers/smister)[@smister](https://github.com/smister)

---

Tags

mediayii2deluxcmsdeluxcms media

### Embed Badge

![Health badge](/badges/deluxcms-media/health.svg)

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

###  Alternatives

[yiimaker/yii2-social-share

Extension for sharing on social networks

48112.8k4](/packages/yiimaker-yii2-social-share)[yii2mod/yii2-image

Provides methods for the dynamic manipulation of images. Various image formats such as JPEG, PNG, and GIF can be resized, cropped, rotated.

2510.4k](/packages/yii2mod-yii2-image)[noam148/yii2-image-resize

A Yii2 component for resizing images (on the fly)

1044.9k7](/packages/noam148-yii2-image-resize)[developit/yii2-jcrop

 yii2 image cropping extension

101.5k](/packages/developit-yii2-jcrop)

PHPackages © 2026

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