1

I successfully install liipImagine following instructions on this link http://symfony.com/doc/master/bundles/LiipImagineBundle/index.html

But when I'm using the code bellow in my twig file :

{{ad.artwork.pictures|first.path|imagine_filter('home_thumb')}}

I'm getting the following url : http://localhost:8000/media/cache/resolve/home_thumb/70869c5748a21e8e734c4c85e5c18ec6bfa9b196.jpeg

I thought that liipImagine saved (cached) the image on my server in the media/cache/resolve/home_thumb folder but it doesn't do that.

Below, my configuration :

liip_imagine:

# http://symfony.com/doc/master/bundles/LiipImagineBundle/cache-resolvers.html
# 
resolvers:
    default:
        web_path:
            # %kernel.root_dir%/../web
            web_root: %kernel.root_dir%/../../web
            # media/cache
            cache_prefix: media/cache

loaders:
    default:
        filesystem:
            # %kernel.root_dir%/../web/
            data_root: %kernel.root_dir%/../../web/

driver:               gd
cache:                default
data_loader:          default
default_image:        null
controller:
    filter_action:         liip_imagine.controller:filterAction
    filter_runtime_action: liip_imagine.controller:filterRuntimeAction
filter_sets:

    # Prototype
    home_thumb:
        quality:              100
        jpeg_quality:         ~
        png_compression_level:  ~
        png_compression_filter: ~
        animated:             false
        format:               ~
        cache:                ~
        data_loader:          ~
        default_image:        null
        filters:

            # Prototype
            thumbnail:        { size: [120, 90], mode: outbound }

If I'm doing something wrong, can somebody explain me ?

EDIT POST: When I run CLI, I get this below:

C:\xampp\htdocs\myproject>php app/console liip:imagine:cache:resolve uploads/media/70869c5748a21e8e734c4c85e5c18ec6bfa9b196.jpg --filters=home_thumb

[Liip\ImagineBundle\Exception\Binary\Loader\NotLoadableException]
Source image not found in "C:\xampp\htdocs\myproject\app/../web/uploads/media/70869c5748a21e8e734c4c85e5c18ec6bfa9b196.jpg"

I really thanks you for your advices.

Benjamin Lucas
  • 370
  • 5
  • 20
  • 2
    Yes, it doesn't do that because `resolve` in path means that you first time requested image (image doesn't exist jet), next time when you visit page, you will see link to cached(saved) image. – malcolm Sep 20 '15 at 18:50
  • After several reload pages, I don't see changement. Any other idea ? I run localhost (php app/console server:run) localhost:8000 – Benjamin Lucas Sep 21 '15 at 06:18
  • `media/cache` should be `/media/cache` in config, folder must exist in web/madia/cache and must be writable by webserver user. – malcolm Sep 21 '15 at 07:19
  • @malcolm what do you mean by must ? can't it be web/images/media/cache ? – Yamen Nassif Oct 04 '16 at 09:23
  • @YamenImadNassif I mean that if you setup `/media/cache` the folder must exist and must be writable. If you setup `/images/media/cache` the folder must exist as well. – malcolm Oct 04 '16 at 17:43
  • @malcolm thanks for the answer – Yamen Nassif Oct 04 '16 at 17:45
  • @malcolm i already have the folder writable and exists can you please see this one ? http://stackoverflow.com/questions/39836143/liip-imagine-with-vich-uploader-not-creating-cache – Yamen Nassif Oct 04 '16 at 17:45

0 Answers0