PHPackages                             teariot/faker-fillthis - 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. teariot/faker-fillthis

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

teariot/faker-fillthis
======================

A Laravel Faker provider for generating placeholder images via the fillthis.io service.

1.2.2(1y ago)01.2k↓86.9%MITPHP

Since Mar 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/TeaRiot/Faker-FillThis)[ Packagist](https://packagist.org/packages/teariot/faker-fillthis)[ Docs](https://github.com/TeaRiot/Faker-FillThis)[ RSS](/packages/teariot-faker-fillthis/feed)WikiDiscussions main Synced 2d ago

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

FakerFillThis
=============

[](#fakerfillthis)

FakerFillThis is a custom Faker provider for generating placeholder image URLs and downloading images from [fillthis.io](https://fillthis.io). This provider conforms to the Laravel Faker interface for `imageUrl`, `image`, and `url` methods.

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

[](#installation)

Install via Composer:

```
  composer require teariot/faker-fillthis
```

Usage
-----

[](#usage)

Add the provider to your Faker instance:

```
use Faker\Factory;
use TeaRiot\FakerFillThis\Faker\Provider\FillThisImage;

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

### Generating an Image URL

[](#generating-an-image-url)

- **Default Image:** Returns the default endpoint. ```
    echo $faker->imageUrl(0, 0);
    ```
- **Custom Dimensions:** For a 500x500 image. ```
    echo $faker->imageUrl(500, 500, null, false, null, false, "png");
    ```
- **With Random Word:** Appends a random word to the text parameter. ```
    echo $faker->imageUrl(800, 600, null, true, null, false, "png");
    ```
- **Category-based Image:** When specifying a category (e.g., "fashion" or "all"), the library generates a URL with a seed that directly points to an image from that category. Note that in this mode, the width and height parameters are ignored. This approach is implemented for improved performance by avoiding the need to resize images. ```
    echo $faker->imageUrl(0, 0, "fashion", false, null, false, "png");
    ```

### Generating a Video URL

[](#generating-a-video-url)

When the type is set to `"video"`, the URL will include a `.mp4` extension for clear identification:

```
echo $faker->url('video');
```

### Downloading an Image

[](#downloading-an-image)

Download an image to a specified directory (or system temporary directory by default):

```
$imagePath = $faker->image(__DIR__, 800, 600, null, true, true, "TestImage", false, "png");
if ($imagePath !== false) {
    echo "Image downloaded at: " . $imagePath;
} else {
    echo "Error downloading image.";
}
```

API Reference
-------------

[](#api-reference)

- **imageUrl**```
    imageUrl(
        int $width = 640,
        int $height = 480,
        ?string $category = null,
        bool $randomize = true,
        ?string $word = null,
        bool $gray = false,
        string $format = 'png'
    ): string
    ```
- **url**```
    url(?string $type = null): string
    ```
- **image**```
    image(
        ?string $dir = null,
        int $width = 640,
        int $height = 480,
        ?string $category = null,
        bool $fullPath = true,
        bool $randomize = true,
        ?string $word = null,
        bool $gray = false,
        string $format = 'png'
    ): string|false
    ```

Categories
----------

[](#categories)

> **Note:** The list of categories is deprecated. To obtain the complete list of categories, call the API at .

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance43

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Total

4

Last Release

485d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f6607a58ba1ad9fbbdcdf6566b2300b87e38135e8697bebe5a5883b6034eebe?d=identicon)[TeaRiot](/maintainers/TeaRiot)

---

Top Contributors

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

---

Tags

laravelfakerproviderimagesplaceholderfillthis.io

### Embed Badge

![Health badge](/badges/teariot-faker-fillthis/health.svg)

```
[![Health](https://phpackages.com/badges/teariot-faker-fillthis/health.svg)](https://phpackages.com/packages/teariot-faker-fillthis)
```

###  Alternatives

[mmo/faker-images

Different images provider for Faker

59420.8k8](/packages/mmo-faker-images)[okipa/laravel-medialibrary-ext

Extra features for spatie/laravel-medialibrary package.

1011.2k](/packages/okipa-laravel-medialibrary-ext)

PHPackages © 2026

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