PHPackages                             ilaoniu/dummyimage - 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. ilaoniu/dummyimage

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

ilaoniu/dummyimage
==================

Dummy Image.

v1.0.1(1y ago)0147MITPHPPHP ^8.0

Since Jan 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ilaoniu/dummyimage)[ Packagist](https://packagist.org/packages/ilaoniu/dummyimage)[ RSS](/packages/ilaoniu-dummyimage/feed)WikiDiscussions main Synced 1mo ago

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

DummyImage
==========

[](#dummyimage)

Install
-------

[](#install)

```
composer require ilaoniu/dummyimage --dev

```

Laravel
-------

[](#laravel)

First, add a new route:

```
Route::middleware('cache.headers:public;max_age=2628000;etag')->get('__dummy-image/{size}/{bgColor?}/{textColor?}', function (Request $request, string $size, ?string $bgColor = null, ?string $textColor = null) {
    $dummyImage = new DummyImage;
    ['content' => $content, 'headers' => $headers] = $dummyImage->image($size, $bgColor, $textColor, $request->query('text'));

    return response($content)->withHeaders($headers);
});
```

Then, you can get image url like this:

```
$dummyImage = new DummyImage;
$dummyImage->imageUrl(config('app.url') . '/__dummy-image');
```

Usage
-----

[](#usage)

### Size

[](#size)

width x height

- Height is optional, if no height is specified the image will be a square. Example:
- **Must** be the first option in the url
- You can specify one dimension and a ratio and dummyimage will calculate the right value. Example:  or

### Colors

[](#colors)

background color / text color

- Colors are represented as hex codes (#ffffff is white).
- Colors always follow the dimensions,  not .
- The first color is always the background color and the second color is the text color.
- The background color is optional and defaults to gray (#cccccc)
- The text color is optional and defaults to black (#000000)
- There are shortcuts for colors
    - 3 digits will be expanded to 6, `09f` becomes `0099ff`
    - 1 digit will be repeated 6 times, `c` becomes `cccccc` Note: a single 0 will not work, use 00 instead.
- Standard image sizes are also available. See the [complete list](#standards).
    -
    -

### Image Formats

[](#image-formats)

.gif, .jpg, .png, .webp

- Adding an image file extension will render the image in the proper format
- Image format is optional and the default is a gif
- jpg and jpeg are the same
- The image extension can go at the end of size option in the url
    -

### Custom Text

[](#custom-text)

?text=Hello+World

- Custom text can be entered using a query string at the very end of the url
- This is optional, default is the image dimensions (300×250)
- a-z (upper and lowercase), numbers, and most symbols will work just fine.
- Spaces become +
    - !

Thanks
------

[](#thanks)

, Dummy Image is written in PHP and distributed freely under a MIT License.

Source code behind

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance42

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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

Every ~12 days

Total

2

Last Release

476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6388dcb1cb7b55879961c4f4a6df7fc7a99d5e639c735c41c3df46b1ccc9d1e?d=identicon)[ilaoniu](/maintainers/ilaoniu)

---

Top Contributors

[![ilaoniu](https://avatars.githubusercontent.com/u/9882927?v=4)](https://github.com/ilaoniu "ilaoniu (2 commits)")

---

Tags

laravel

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ilaoniu-dummyimage/health.svg)

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

###  Alternatives

[classic-o/nova-media-library

Tool and field that will let you managing files and add them to the posts

154172.0k](/packages/classic-o-nova-media-library)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14543.9k3](/packages/tomatophp-filament-media-manager)[nikkanetiya/laravel-color-palette

Laravel Wrapper for `ksubileau/color-thief-php`. Grabs the dominant color or a representative color palette from an image. Uses PHP and GD or Imagick.

3312.6k](/packages/nikkanetiya-laravel-color-palette)[elegantly/laravel-media

A flexible media library for Laravel

474.9k2](/packages/elegantly-laravel-media)

PHPackages © 2026

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