PHPackages                             niklasbr/quick-magick - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. niklasbr/quick-magick

ActiveLibrary[Testing &amp; Quality](/categories/testing)

niklasbr/quick-magick
=====================

Image placeholder provider for Faker

1.0.1(1mo ago)30AGPL-3.0-onlyPHPPHP ^8.3CI passing

Since Jun 9Pushed 2w ago1 watchersCompare

[ Source](https://github.com/NiklasBr/quick-magick)[ Packagist](https://packagist.org/packages/niklasbr/quick-magick)[ Docs](https://github.com/niklasbr/quick-magick)[ RSS](/packages/niklasbr-quick-magick/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (5)Versions (8)Used By (0)

QuickMagick
===========

[](#quickmagick)

A very fast Faker-compatible image placeholder library for PHP. Generate gradients, plasma effects, repeating patterns, solid color canvases, labels, captions, and random image variants without any network requests.

[![Coverage](.github/badge-coverage.svg "Badge: Code coverage percentage")](.github/badge-coverage.svg)[![PHPStan](https://camo.githubusercontent.com/022b70e6631d055205dfebf2aa7e53b3f63e7a3ea04a18e86429f279e29a29f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d627269676874677265656e "Badge: PHP Stan level")](https://camo.githubusercontent.com/022b70e6631d055205dfebf2aa7e53b3f63e7a3ea04a18e86429f279e29a29f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d627269676874677265656e)[![Dependabot](https://camo.githubusercontent.com/5914774cd5d485a373aca71cbb34b5a362f92ab0b7fd1fae2695cc375ed8976f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446570656e6461626f742d456e61626c65642d626c75653f6c6f676f3d646570656e6461626f74 "Badge: Dependabot enabled")](https://camo.githubusercontent.com/5914774cd5d485a373aca71cbb34b5a362f92ab0b7fd1fae2695cc375ed8976f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446570656e6461626f742d456e61626c65642d626c75653f6c6f676f3d646570656e6461626f74)

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

[](#installation)

Install this [Faker provider](https://fakerphp.org/#faker-internals-understanding-providers) with [Composer](https://getcomposer.org/):

```
composer require niklasbr/quick-magick
```

Quick start
-----------

[](#quick-start)

Register the QuickMagick Faker provider and generate an image with category-specific arguments.

```
use Faker\Factory;
use NiklasBr\QuickMagick\QuickMagick;

$faker = Factory::create();
$faker->addProvider(new QuickMagick($faker));
```

```
// Simple image with only default parameters
$imageData = $faker->image();
```

[![default_output.png](docs/img/default_output.png "simple silver image")](docs/img/default_output.png)

```
// A linear gradient (using mixed colour notation)
$imageData = $faker->image(category: 'LINEAR_GRADIENT', word: '#1100ff-magenta');
```

[![linear_gradient.png](docs/img/linear_gradient.png "orange-magenta vertical gradient")](docs/img/linear_gradient.png)

Faker provider features
-----------------------

[](#faker-provider-features)

QuickMagick adds a Faker-compatible image provider that uses the same API shape as the built-in Faker image provider, with additional image generation options:

- Generate image files directly with `image()`
- Return raw image blob bytes with `imageData()`
- Build data URL:s with `imageUrl()`
- Create and store image files with `createImageFile()`
- Generate random images of a certain style/category with `randomSolidColor()`, `randomGradient()`, `randomPattern()`, `randomPlasma()` and `randomImage()`
- Supports formats `png`, `jpeg`, `gif`, `webp`, `tiff`, `bmp`

Example categories
------------------

[](#example-categories)

The library supports several visual categories and type-specific arguments:

- `SOLID_COLOR` — flat color canvas, chosen with a hex color string like `#2E86AB`
- `LINEAR_GRADIENT` — linear gradient, specified with a color pair like `#667EEA-#764BA2`
- `RADIAL_GRADIENT` — radial gradient, also using paired colors
- `PATTERN` — repeating texture pattern, selected with a pattern token
- `PLASMA` — plasma noise effect, optionally with a seed color
- `LABEL` — single-line text label image
- `CAPTION` — multi-line wrapped text image

Documentation and examples
--------------------------

[](#documentation-and-examples)

Example images and their generation arguments are available in [docs/documentation.md](docs/documentation.md).

License
-------

[](#license)

This package is available under two licenses:

- [Affero GPL Version 3, 19 November 2007](LICENSE-AGPL-3.0.md), this is the default license.
- [BSD-3-Clause via commercial agreement](LICENSE-Commercial.md), available via donation to charity. Grants a limited warranty and fitness-for-purpose promise.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance93

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.2% 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 ~70 days

Recently: every ~8 days

Total

6

Last Release

56d ago

Major Versions

0.7.0 → 1.0.02026-05-28

### Community

Maintainers

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

---

Top Contributors

[![NiklasBr](https://avatars.githubusercontent.com/u/279826?v=4)](https://github.com/NiklasBr "NiklasBr (109 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (94 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

phptestingimageImageMagickimagickfakerfixturesdatadevelopmentplaceholder

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/niklasbr-quick-magick/health.svg)

```
[![Health](https://phpackages.com/badges/niklasbr-quick-magick/health.svg)](https://phpackages.com/packages/niklasbr-quick-magick)
```

###  Alternatives

[fakerino/fakerino

Faker framework, for generate every kind of fake data for test, database seed, mock responses, other

12114.9k5](/packages/fakerino-fakerino)

PHPackages © 2026

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