PHPackages                             ulasoft/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. ulasoft/fakerphp-picsum-images

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

ulasoft/fakerphp-picsum-images
==============================

Alternative image provider for fakerphp using picsum.photos

v1.0.1(4y ago)0235[1 PRs](https://github.com/ulasoft/fakerphp-picsum-images/pulls)MITPHPPHP ^8.0

Since Sep 10Pushed 4y agoCompare

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

READMEChangelogDependencies (5)Versions (4)Used By (0)

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/6611a728131ee41a2a5ce675c3587f9be1a016cc6b84fd455cdd0c30ffdea338/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f736d6b6e7374642f66616b65727068702d70696373756d2d696d616765732f54657374733f6c6162656c3d7465737473)](https://github.com/smknstd/fakerphp-picsum-images/actions?query=workflow%3ATests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ba5262e1741cabc9c17e62a4b18ba0961b7f7efdb68e7ddf7d0445a9c7297966/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f736d6b6e7374642f66616b65727068702d70696373756d2d696d616765732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/smknstd/fakerphp-picsum-images/actions?query=workflow%3A%22Check+%26+fix+styling%22+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);

// 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)
- 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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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 ~63 days

Total

3

Last Release

1576d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.0.2.x-devPHP 7.4.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a9e8f1ea447b8c1797379287fe8e7b842a258b25fd51d137b24650d65eaff9c?d=identicon)[ulasoft](/maintainers/ulasoft)

---

Top Contributors

[![smknstd](https://avatars.githubusercontent.com/u/2412608?v=4)](https://github.com/smknstd "smknstd (13 commits)")[![ulasoft](https://avatars.githubusercontent.com/u/17276946?v=4)](https://github.com/ulasoft "ulasoft (1 commits)")

---

Tags

phpfakerimagespicsum

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[smknstd/fakerphp-picsum-images

Alternative image provider for fakerphp using picsum.photos

45218.1k3](/packages/smknstd-fakerphp-picsum-images)[mmo/faker-images

Different images provider for Faker

59370.3k6](/packages/mmo-faker-images)[aalaap/faker-youtube

Faker provider for generating fake YouTube video URLs

2288.6k](/packages/aalaap-faker-youtube)[georgringer/faker

Faker for TYPO3

165.1k](/packages/georgringer-faker)

PHPackages © 2026

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