PHPackages                             tvdr/picsum-placeholder - 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. tvdr/picsum-placeholder

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

tvdr/picsum-placeholder
=======================

a simple way to use Picsum.photos in your Laravel app.

1.0.0(3y ago)06MITPHPPHP ^7.4|^8.0

Since Aug 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tvdr/picsum-placeholder)[ Packagist](https://packagist.org/packages/tvdr/picsum-placeholder)[ Docs](https://github.com/tvdr/picsum-placeholder)[ RSS](/packages/tvdr-picsum-placeholder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

🖼️ Use Picsum.photos in your laravel app
========================================

[](#️-use-picsumphotos-in-your-laravel-app)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7d67618425ace9c403618c5d33a84d3351861804a5bb05798f0056766ecbd81f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f747664722f70696373756d2d706c616365686f6c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tvdr/picsum-placeholder)[![Total Downloads](https://camo.githubusercontent.com/a95aeb658961a5464c7da9a6c70f5c3e6eaba21bca12535eaa2d5093a75ec9d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f747664722f70696373756d2d706c616365686f6c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tvdr/picsum-placeholder)

This package provides a simple way to use [Picsum.photos](https://picsum.photos/) in your Laravel app.

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

[](#installation)

You can install the package via composer:

```
composer require tvdr/picsum-placeholder
```

### Config Files

[](#config-files)

In order to edit the default configuration you may execute:

```
php artisan vendor:publish --provider="Tvdr\PicsumPlaceholder\PicsumPlaceholderServiceProvider" --tag="config"

```

After that, `config/picsum-placeholder.php` will be created.

The configuration options are:

namedescriptiontypedefault value`api_url`the base url for picsum.photosstring`https://picsum.photos/``width`width of imageinteger`300``height`height of imageinteger`300``blur`amount of blur on imagefalse | integer\[1..10\]`false``grayscale`always get a grayscale imagefalse | true`false``random`append a random string to the url to bust browser cachefalse | true`true``override_route`route to override (e.g to always load a placeholder on non existent storage images)false | string`/storage/{path?}`Usage
-----

[](#usage)

You can use the facade to write well-readable code as well as a predefined global helper method if you don't want it as a singleton

```
//return image url with default parameters
PicsumPlaceholder::getUrl()
picsum_placeholder()->getUrl()
```

```
//return image as a blob string  with default parameters
PicsumPlaceholder::getBlob()
picsum_placeholder()->getBlob()
```

### Use the methods below to set options

[](#use-the-methods-below-to-set-options)

#### Width

[](#width)

```
PicsumPlaceholder::width(250);
picsum_placeholder()->width(410);
```

#### Height

[](#height)

```
PicsumPlaceholder::height(120);
picsum_placeholder()->height(540);
```

#### Blur

[](#blur)

```
PicsumPlaceholder::blur(3);
picsum_placeholder()->blur(false);
```

#### Grayscale

[](#grayscale)

```
PicsumPlaceholder::grayscale(true);
picsum_placeholder()->grayscale(false);
```

#### Random

[](#random)

```
PicsumPlaceholder::random(true);
picsum_placeholder()->grayscale(false);
```

All methods are chainable so nothing stops you from using

```
PicsumPlaceholder::width(120)->height(500)->grayscale(false)->blur(2)->getUrl();
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

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

---

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

1372d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61efef45ed738a4052e959cf5e5b77c93ff8e410ddb8305ecedc9e08927681dd?d=identicon)[tvdr](/maintainers/tvdr)

---

Top Contributors

[![tvdr](https://avatars.githubusercontent.com/u/6872670?v=4)](https://github.com/tvdr "tvdr (2 commits)")

---

Tags

tvdrpicsum-placeholder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tvdr-picsum-placeholder/health.svg)

```
[![Health](https://phpackages.com/badges/tvdr-picsum-placeholder/health.svg)](https://phpackages.com/packages/tvdr-picsum-placeholder)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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