Search code examples
symfonyliipimaginebundle

LiipImagineBundle + Symfony media from web url doesn't work?


I use Symfony 2.0.19 with LiipImagineBundle

I want to use a filter for an image from the web (for example: http://images.apple.com/retail/fifthavenue/images/fifthavenue_hero.jpg) but the imagine_filter seems not to work with image from the web.

Does somebody have an explication?

config.yml:

liip_imagine:
    filter_sets:
        thumbnail:
            filters:
                thumbnail: { size: [300, 300], mode: outbound }

HTML

<img src="{{ asset('http://images.apple.com/retail/fifthavenue/images/fifthavenue_hero.jpg') |imagine_filter('thumbnail') }}" />

Output:

There is no image processed :-(


Solution

  • I have discussed with the author of LiipImagineBundle and for the moment it's not possible to do it.

    You have to use a hack, I propose you another approach:

    1. download to your server the image you want to use
    2. use your filter
    3. delete the tmp file

    See ya