Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bernhardwebstudio/placeholderbundle
Bundle for Symfony to generate placeholders for images
https://github.com/bernhardwebstudio/placeholderbundle
placeholder placeholder-generator sqip symfony symfony-bundle
Last synced: 3 months ago
JSON representation
Bundle for Symfony to generate placeholders for images
- Host: GitHub
- URL: https://github.com/bernhardwebstudio/placeholderbundle
- Owner: BernhardWebstudio
- License: mit
- Created: 2018-05-02T10:04:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T10:24:58.000Z (4 months ago)
- Last Synced: 2024-10-10T13:04:06.573Z (3 months ago)
- Topics: placeholder, placeholder-generator, sqip, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 881 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# PlaceholderBundle
![GitHub Tests](https://github.com/BernhardWebstudio/PlaceholderBundle/workflows/PHP%20Tests/badge.svg)
[![Travis](https://img.shields.io/travis/BernhardWebstudio/PlaceholderBundle.svg?style=flat-square)](https://travis-ci.org/BernhardWebstudio/PlaceholderBundle)
[![Coverage Status](https://img.shields.io/coveralls/github/BernhardWebstudio/PlaceholderBundle.svg?style=flat-square)](https://coveralls.io/github/BernhardWebstudio/PlaceholderBundle?branch=master)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FBernhardWebstudio%2FPlaceholderBundle.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FBernhardWebstudio%2FPlaceholderBundle?ref=badge_shield)- [PlaceholderBundle](#placeholderbundle)
- [What is this bundle?](#what-is-this-bundle)
- [Installation](#installation)
- [Applications that use Symfony Flex](#applications-that-use-symfony-flex)
- [Applications that don't use Symfony Flex](#applications-that-dont-use-symfony-flex)
- [Step 1: Download the Bundle](#step-1-download-the-bundle)
- [Step 2: Enable the Bundle](#step-2-enable-the-bundle)
- [Configuration](#configuration)
- [Usage](#usage)
- [In a Controller or Service](#in-a-controller-or-service)
- [In Twig](#in-twig)
- [Just the URL, please](#just-the-url-please)
- [Pregenerate images](#pregenerate-images)
- [Contributions](#contributions)
- [License](#license)
- [bernhard-webstudio/placeholder-bundle for enterprise](#bernhard-webstudioplaceholder-bundle-for-enterprise)What is this bundle?
============Use this bundle if you are looking for an easy way to generate beautiful
placeholders or thumbnails for your project.Do you provide a site with pages full of images? Do you use a lazy-loader with a grey-only image?
Then this bundle is something for you respectively your site!Depending on your configuration and your local environment,
you can let the bundle return placeholders generated with
[Primitive](https://github.com/fogleman/primitive) or [sqip](https://github.com/technopagan/sqip/blob/master/README.md).Installation
============You need to have the service installed which you want to use.
Refer to their webpages linked above to get the installation guide.
To install this bundle, refer to the following guide.Applications that use Symfony Flex
----------------------------------*(This installation type is not yet supported.
Please refer to the next installations instructions or create a recipe.)*
Open a command console, enter your project directory and execute:```console
$ composer require bernhard-webstudio/placeholder-bundle
```Applications that don't use Symfony Flex
----------------------------------------### Step 1: Download the Bundle
Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:```console
$ composer require bernhard-webstudio/placeholder-bundle
```This command requires you to have Composer installed globally, as explained
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
of the Composer documentation.### Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the `app/AppKernel.php` file of your project:```php