https://github.com/endroid/image-placeholder
Easy integration of image placeholders in your project
https://github.com/endroid/image-placeholder
Last synced: about 1 year ago
JSON representation
Easy integration of image placeholders in your project
- Host: GitHub
- URL: https://github.com/endroid/image-placeholder
- Owner: endroid
- License: mit
- Created: 2015-08-17T22:14:33.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-10-20T14:11:19.000Z (over 1 year ago)
- Last Synced: 2025-03-25T10:05:23.631Z (over 1 year ago)
- Language: PHP
- Homepage: https://endroid.nl/
- Size: 166 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Image Placeholder
*By [endroid](https://endroid.nl/)*
[](https://packagist.org/packages/endroid/image-placeholder)
[](https://github.com/endroid/image-placeholder/actions)
[](https://packagist.org/packages/endroid/image-placeholder)
[](https://packagist.org/packages/endroid/image-placeholder)
[](https://packagist.org/packages/endroid/image-placeholder)
Provides a Twig filter that replaces empty or invalid URLs with a placeholder image.
## Installation
Use [Composer](https://getcomposer.org/) to install the library.
``` bash
$ composer require endroid/image-placeholder
```
## Configuration
The default placeholder generation parameters can be overridden via the
constructor arguments or service definition. All parameters are optional.
## 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.
``` twig
```
## 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
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.