PHPackages                             ccharz/faker-gd-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. ccharz/faker-gd-image

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

ccharz/faker-gd-image
=====================

FakerPHP Provider to create random images with the help of gd

v1.0.0(2y ago)11.7k↓75%MITPHPPHP ^8.0

Since Jul 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ccharz/faker-gd-image)[ Packagist](https://packagist.org/packages/ccharz/faker-gd-image)[ RSS](/packages/ccharz-faker-gd-image/feed)WikiDiscussions main Synced 3w ago

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

Faker-GD-Image
==============

[](#faker-gd-image)

FakerPHP () Provider to create random images with the help of gd. This provider uses the same function signature as the build-in image provider image function ([https://fakerphp.github.io/formatters/image/#image\_1](https://fakerphp.github.io/formatters/image/#image_1)) so it can be used as a direct replacement

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

[](#installation)

```
composer require ccharz/faker-gd-image
```

Usage
-----

[](#usage)

```
$faker = \Faker\Factory::create();
$faker->addProvider(new \Faker\Provider\GdImage($faker));

// Stores a generated image in the systems tmp folder
$image_path = $faker->gdImage($dir = null, $width = 640, $height = 480);

// Returns a gd image object
$gd_image = $faker->gdImageObject($width = 640, $height = 480, $text = 'Test', $background_color = '6A6A6A');
```

Usage in Laravel
----------------

[](#usage-in-laravel)

To use it in laravel factories you could add this to the `AppServiceProvider.php`:

```
/**
 * Register any application services.
 *
 * @return void
 */
public function register()
{
    $this->app->singleton(\Faker\Generator::class, function () {
        $faker = \Faker\Factory::create();
        $faker->addProvider(new \Faker\Provider\GdImage($faker));
        return $faker;
    });
}
```

Acknowledgment
--------------

[](#acknowledgment)

This project uses  which is published under the SIL Open Font License

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

3

Last Release

840d ago

Major Versions

v0.0.2 → v1.0.02024-03-08

### Community

Maintainers

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

---

Top Contributors

[![ccharz](https://avatars.githubusercontent.com/u/2725238?v=4)](https://github.com/ccharz "ccharz (10 commits)")

---

Tags

imagegdfakerproviderfakerphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ccharz-faker-gd-image/health.svg)

```
[![Health](https://phpackages.com/badges/ccharz-faker-gd-image/health.svg)](https://phpackages.com/packages/ccharz-faker-gd-image)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k203.8M2.5k](/packages/intervention-image)[league/glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k52.6M138](/packages/league-glide)[gregwar/image

Image handling

1.0k4.1M51](/packages/gregwar-image)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

854936.5k12](/packages/sybio-image-workshop)[intervention/image-laravel

Laravel Integration of Intervention Image

1558.1M159](/packages/intervention-image-laravel)[intervention/gif

PHP GIF Encoder/Decoder

6025.4M14](/packages/intervention-gif)

PHPackages © 2026

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