Skip to content

A bridge for symfony with the phumbor client from 99designs

License

Notifications You must be signed in to change notification settings

eNRJ/PhumborBundle

 
 

Repository files navigation

PhumborBundle

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

A bridge for symfony with the phumbor client from 99designs to generate thumbor url.

Prerequisites

Of course, you must have a thumbor server installed and operationnal. If not, you can follow the official installation documentation.

Installation

Add jbouzekri/phumbor-bundle as a dependency in composer.json.

"jbouzekri/phumbor-bundle": "~1.0"

Enable the bundle in your AppKernel :

$bundles = array(
    ...
    new Jb\Bundle\PhumborBundle\JbPhumborBundle()
);

In your config.yml, configure at least the url of your thumbor server and the secret :

jb_phumbor:
    server:
        url: http://localhost
        secret: 123456789

Quick use case

You need to resize the image of your article to fit in a square of 50x50. Define the following transformation in your config.yml :

jb_phumbor:
    transformations:
        article_list:
            fit_in: { width: 50, height: 50 }

Now you can use it in twig :

{{ thumbor(<the absolute url of your image>, 'article_list') }}

Documentation

License

MIT - see LICENSE

About

A bridge for symfony with the phumbor client from 99designs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%