PHPackages                             endroid/image-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. [Image &amp; Media](/categories/media)
4. /
5. endroid/image-placeholder

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

endroid/image-placeholder
=========================

Endroid Image Placeholder

3.1.1(2mo ago)82.3kMITPHPPHP ^8.4CI passing

Since Aug 17Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/endroid/image-placeholder)[ Packagist](https://packagist.org/packages/endroid/image-placeholder)[ Docs](https://github.com/endroid/image-placeholder)[ GitHub Sponsors](https://github.com/endroid)[ RSS](/packages/endroid-image-placeholder/feed)WikiDiscussions main Synced 2d ago

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

Image Placeholder
=================

[](#image-placeholder)

*By [endroid](https://endroid.nl/)*

[![Latest Stable Version](https://camo.githubusercontent.com/cbd22f3c962f3c8cb8d2e75d9309ce47d3d21a9e11e544d840967960f48a1b56/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e64726f69642f696d6167652d706c616365686f6c6465722e737667)](https://packagist.org/packages/endroid/image-placeholder)[![Build Status](https://github.com/endroid/image-placeholder/workflows/CI/badge.svg)](https://github.com/endroid/image-placeholder/actions)[![Total Downloads](https://camo.githubusercontent.com/c4e339c20b34fa5a77fcdddb28675dcefa50e81a2f03645762fc9bfc8b8ab166/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e64726f69642f696d6167652d706c616365686f6c6465722e737667)](https://packagist.org/packages/endroid/image-placeholder)[![Monthly Downloads](https://camo.githubusercontent.com/15ed7b86f368f834258885633a2708a25a5ca19b56d56ce98463809c915da79c/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f656e64726f69642f696d6167652d706c616365686f6c6465722e737667)](https://packagist.org/packages/endroid/image-placeholder)[![License](https://camo.githubusercontent.com/1a833ab9a6b19a398bcb1e6a40baf41050dd7d22a456346887baa0b2ea7bf85c/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656e64726f69642f696d6167652d706c616365686f6c6465722e737667)](https://packagist.org/packages/endroid/image-placeholder)

Provides a Twig filter that replaces empty or invalid URLs with a placeholder image.

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

[](#installation)

Use [Composer](https://getcomposer.org/) to install the library.

```
$ composer require endroid/image-placeholder
```

Configuration
-------------

[](#configuration)

The default placeholder generation parameters can be overridden via the constructor arguments or service definition. All parameters are optional.

Usage
-----

[](#usage)

Placeholders are placed via a Twig filter that shows the placeholder image in case the service is activated and the given URL is empty or invalid.

```

```

Versioning
----------

[](#versioning)

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.

License
-------

[](#license)

This library is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

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

Recently: every ~292 days

Total

22

Last Release

80d ago

Major Versions

1.x-dev → 2.0.02018-01-14

2.0.4 → 3.0.02022-12-12

PHP version history (8 changes)1.0.0PHP &gt;=5.3.0

1.2.0PHP &gt;=5.4

2.0.0PHP &gt;=7.1

2.0.4PHP &gt;=7.2

3.0.0PHP ^8.0

3.0.2PHP ^8.1

3.1.0PHP ^8.2

3.1.1PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea3fc1b297f29579f9861b5fbe3240c0eeafaaaee6e39b45d85d612a04a52fbd?d=identicon)[endroid](/maintainers/endroid)

---

Top Contributors

[![endroid](https://avatars.githubusercontent.com/u/537253?v=4)](https://github.com/endroid "endroid (70 commits)")

---

Tags

phpimageendroidplaceholderUnsplashplaceholdplacekitten

### Embed Badge

![Health badge](/badges/endroid-image-placeholder/health.svg)

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

###  Alternatives

[lciolecki/php-image-optimizer

PHP image file optimizer (uses https://github.com/bensquire/php-image-optim)

347.4k](/packages/lciolecki-php-image-optimizer)

PHPackages © 2026

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