PHP code example of socloz / imagine-bundle

1. Go to this page and download the library: Download socloz/imagine-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

socloz / imagine-bundle example snippets


$avalancheService = $this->get('imagine.cache.path.resolver');

$cachedImage = $avalancheService->getBrowserPath($object->getWebPath(), 'my_thumb');
 bash
$ php composer.phar update avalanche123/imagine-bundle
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Avalanche\Bundle\ImagineBundle\AvalancheImagineBundle(),
    );
}
 php
<img src=" $this['imagine']->filter('/relative/path/to/image.jpg', 'my_thumb')