PHPackages                             boomdraw/laravel-dummy-image - 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. boomdraw/laravel-dummy-image

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

boomdraw/laravel-dummy-image
============================

Laravel dummy image generator based on kingkool68/dummyimage

0.2.1(7y ago)11.6k2[1 issues](https://github.com/boomdraw/laravel-dummy-image/issues)MITPHPPHP ^7.0

Since Aug 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/boomdraw/laravel-dummy-image)[ Packagist](https://packagist.org/packages/boomdraw/laravel-dummy-image)[ Docs](https://github.com/boomdraw/laravel-dummy-image)[ RSS](/packages/boomdraw-laravel-dummy-image/feed)WikiDiscussions master Synced yesterday

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

Generate dummy images
=====================

[](#generate-dummy-images)

This package allows you to generate dynamic dummy image in Laravel framework.

It's based on the [Russell Heimlich's dummy image generator](https://github.com/kingkool68/dummyimage)

Once installed you can do stuff like this:

```
// Generate and store an image
DummyImage::put($path, $disk);

// Generate and return image as response
DummyImage::toResponse($code, $headers);

// Generate and return image as base64
DummyImage::toBase64($code, $headers);
```

Installation
------------

[](#installation)

### Laravel

[](#laravel)

You can install the package via composer:

```
composer require boomdraw/laravel-dummy-image
```

You can publish the config file with:

```
php artisan vendor:publish --provider="BoomDraw\DummyImage\DummyImageServiceProvider" --tag="config"
```

When published, [the `config/dummyimage.php` config file](https://github.com/boomdraw/laravel-dummy-image/blob/master/config/dummyimage.php) contains:

```
return [

    /*
     * Default disk for generated image
     */
    'disk' => 'local',

    /*
     * Default path for generated image
     */
    'path' => 'dummyimage',

    /*
     * Additional headers for response
     */
    'headers' => [
        //
    ],

    /*
     * Additional html color names with hex value for name to hex convertation
     */
    'color_names' => [
        //'color_name' => '00ffff'
    ],
];
```

Usage
-----

[](#usage)

```
// Generate an image with custom params
$image = DummyImage::generate($dimensions = '200x1:5', $format = 'gif', $bg_color = 'ff00cc', $fg_color = '00ffcc', $text = 'I am image text');

// Generate and store an image
$image->put($path, $disk);

// Generate and return image as response
$image->toResponse($code, $headers);

// Generate and return image as base64 string
$image->toBase64($code, $headers);
```

If any of the methods will be used without generate() one, an image will be generated with default params.

You can provide your own parameters for generating image:

- $dimensions - image dimensions.
    You can provide as dimensions image size and/or ratio. By default used '800x600'.
    Examples:
    '800x600' will generate an image with width 800px and height 600px
    '800' will generate an image with 800px width and height
    '250x1:2' will generate an image with 250px width and 500px height
    '1:3x300' will generate an image with width 100px and height 300px
- $format - generated image format ('jpg', 'gif', 'png'). Default format is 'png'.
- $bg-color - image background color in hex. Default is white ('ffffff').
- $fg\_color - image text color in hex. Default is black ('000000').
- $text variable provides text that will be written on the image. Default is image dimensions.

Resources
---------

[](#resources)

- [Online dynamic dummy image generator](https://dummyimage.com/)

License
-------

[](#license)

The MIT License (MIT).

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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 ~28 days

Total

2

Last Release

2845d ago

### Community

Maintainers

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

---

Top Contributors

[![boomdraw](https://avatars.githubusercontent.com/u/12460074?v=4)](https://github.com/boomdraw "boomdraw (3 commits)")

---

Tags

laravelimageDummyboomdrawlaravel-dummy-image

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/boomdraw-laravel-dummy-image/health.svg)

```
[![Health](https://phpackages.com/badges/boomdraw-laravel-dummy-image/health.svg)](https://phpackages.com/packages/boomdraw-laravel-dummy-image)
```

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1558.1M160](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

506511.0k27](/packages/bkwld-croppa)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4923.6k5](/packages/ralphjsmit-laravel-glide)[reliqarts/laravel-guided-image

Simplified and ready image manipulation for Laravel via intervention image.

341.6k](/packages/reliqarts-laravel-guided-image)

PHPackages © 2026

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