adminui/fakerphp-picsum-images

Alternative image provider for fakerphp using picsum.photos

Maintainers

👁 AdminUI

Package info

github.com/AdminUI/fakerphp-picsum-images

Homepage

pkg:composer/adminui/fakerphp-picsum-images

Statistics

Installs: 620

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2022-10-02 14:48 UTC

Requires

Requires (Dev)

Suggests

  • ext-curl: *

Provides

None

Conflicts

None

Replaces

None

MIT 5f5d3b5c05553630bab6ae69747cfd56e8c08e31

  • Arnaud Becher <arnaud.becher.woop@gmail.com>
  • Craig Riley <c.riley.woop@dsmdesign.co.uk>

phpfakerimagespicsum

This package is auto-updated.

Last update: 2026-05-30 18:04:00 UTC


README

👁 Latest Version on Packagist
👁 GitHub Tests Action Status
👁 GitHub Code Style Action Status
👁 Total Downloads

Introduction

Alternative image provider for fakerphp using picsum.photos

This package has been forked from mmo/faker-images for fzaninotto/faker (deprecated ~ Oct 2020).

Ressources

Installation

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

composer require --dev adminui/fakerphp-picsum-images

Usage

$faker = \Faker\Factory::create();
$faker->addProvider(new \AdminUI\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 :

Credits

License

The MIT License (MIT). Please see License File for more information.