PHPackages                             smknstd/fakerphp-picsum-images - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. smknstd/fakerphp-picsum-images

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

smknstd/fakerphp-picsum-images
==============================

Alternative image provider for fakerphp using picsum.photos

v1.0.3(1y ago)45257.7k—0.9%62MITPHPPHP ^8.0CI passing

Since Sep 10Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/smknstd/fakerphp-picsum-images)[ Packagist](https://packagist.org/packages/smknstd/fakerphp-picsum-images)[ Docs](https://github.com/smknstd/fakerphp-picsum-images)[ GitHub Sponsors](https://github.com/smknstd)[ RSS](/packages/smknstd-fakerphp-picsum-images/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (5)Versions (5)Used By (2)

Fakerphp Picsum Images
======================

[](#fakerphp-picsum-images)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e26d67b2f17fb118ee454ceaf97f6df496264bc1c5e9ecc42278d7f217092f3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d6b6e7374642f66616b65727068702d70696373756d2d696d616765732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smknstd/fakerphp-picsum-images)[![GitHub Tests Action Status](https://camo.githubusercontent.com/885f02191f05ed96ba3981562ed5caaaecc1bc032cacc70c46ac2fcd4f0dbd4c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736d6b6e7374642f66616b65727068702d70696373756d2d696d616765732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e)](https://github.com/smknstd/fakerphp-picsum-images/actions?query=workflow%3ATests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d6b8912b7e8d6907dea0e0444f5d6e012fced85bf74d7c3a3d16590ff9a36653/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736d6b6e7374642f66616b65727068702d70696373756d2d696d616765732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smknstd/fakerphp-picsum-images)

Introduction
------------

[](#introduction)

Alternative image provider for [fakerphp](https://github.com/fakerphp/faker) using [picsum.photos](https://picsum.photos)

*This package has been forked from [mmo/faker-images](https://github.com/morawskim/faker-images) for [fzaninotto/faker](https://github.com/fzaninotto/Faker) (deprecated [~ Oct 2020](https://marmelab.com/blog/2020/10/21/sunsetting-faker.html)).*

Ressources
----------

[](#ressources)

- [Tutorial for laravel](https://smknstd.medium.com/fake-beautiful-images-in-laravel-51062967d1db)

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

[](#installation)

You can install the package via composer in dev dependency section:

```
composer require --dev smknstd/fakerphp-picsum-images
```

Usage
-----

[](#usage)

```
$faker = \Faker\Factory::create();
$faker->addProvider(new \Smknstd\FakerPicsumImages\FakerPicsumImagesProvider($faker));

// return a string that contains a url like 'https://picsum.photos/800/600/'
$faker->imageUrl(width: 800, height: 600);

// return a string that contains a url which returns the same random image based on the provided seed
$filePath= $faker->image(width: 800, height: 800, seed: 'useremail@example.com');

// download a properly sized image from picsum into a file with a file path like '/tmp/13b73edae8443990be1aa8f1a483bc27.jpg'
$filePath= $faker->image(dir: '/tmp', width: 640, height: 480);
```

Also, there are some more options :

- alternative webp format
- effects (grayscale, blurry)
- seeding ensures you can get the same photo each time by providing a seed string
- returning a specific photo based on an id instead of a random one (ex: )

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Arnaud Becher](https://github.com/smknstd)
- [Marcin Morawski ](https://github.com/morawskim)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance50

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~419 days

Total

4

Last Release

501d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2412608?v=4)[Arnaud Becher](/maintainers/smknstd)[@smknstd](https://github.com/smknstd)

---

Top Contributors

[![smknstd](https://avatars.githubusercontent.com/u/2412608?v=4)](https://github.com/smknstd "smknstd (22 commits)")[![mdrobbins](https://avatars.githubusercontent.com/u/1900892?v=4)](https://github.com/mdrobbins "mdrobbins (1 commits)")[![parth391](https://avatars.githubusercontent.com/u/4966579?v=4)](https://github.com/parth391 "parth391 (1 commits)")

---

Tags

fakerphppicsum-apiphpfakerimagespicsum

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/smknstd-fakerphp-picsum-images/health.svg)

```
[![Health](https://phpackages.com/badges/smknstd-fakerphp-picsum-images/health.svg)](https://phpackages.com/packages/smknstd-fakerphp-picsum-images)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k19](/packages/solspace-craft-freeform)[mmo/faker-images

Different images provider for Faker

59420.8k8](/packages/mmo-faker-images)[directorytree/dummy

439.9k](/packages/directorytree-dummy)

PHPackages © 2026

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