0

I tried to implement liipbundle in symfony 2. But when I add this imagine_filter('thumbnail') into the image, it return an error:

Fatal error: Class 'Imagine\Gd\Imagine' not found in /home/piripz8g/public_html/app/cache/prod/appProdProjectContainer.php on line 588

this is my code in the config file:

liip_imagine:
    resolvers:
       default:
          web_path: ~

    filter_sets:
        cache: ~
        thumbnail:
            quality: 75
            filters:
                thumbnail: { size: [120, 90], mode: outbound }

routing:

_liip_imagine:
    resource: "@LiipImagineBundle/Resources/config/routing.xml"

appKernel:

    new Liip\ImagineBundle\LiipImagineBundle(),

twig:

{{ asset(f.path|imagine_filter('thumbnail')) }}
Nickname
  • 11
  • 6
  • Clear the cache: `php app/console cache:clear -e prod` – scoolnico Nov 20 '15 at 14:24
  • i tried this command, but without success – Nickname Nov 20 '15 at 14:27
  • Try running in development mode. It's a bit confusing why you are even getting an error message in production mode since you usually will just get a white screen. Unless you have debug turned on. In any event, development mode should give you a better idea of what is failing. – Cerad Nov 20 '15 at 14:59

2 Answers2

0

I think you forgot to add bundle to app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Liip\ImagineBundle\LiipImagineBundle(),
        );

        // ...
    }

    // ...
}
melnikoved
  • 111
  • 1
  • 10
0

It seems that php5-gd is not loaded. You can verify if php5-gd is loaded typing the following command:

$ php5 -m | grep -i gd

If is not loaded ...

$ sudo apt-get install php5-gd
$ sudo service apache2 restart
dhvarela
  • 36
  • 4