Search code examples
symfonybundleliipimaginebundle

How Avalanche Imagine Bundle can work on production environment?


I try to use AvalancheImagineBundle and I don't understand how it can works in production environment.

The default cache_prefix is media/cache. All cached images will be in the myProject/web/media/cache directory and it's also a Symfony2 route :

Name                Method   Scheme Host Path
_imagine_thumbnail  GET      ANY    ANY  /uploads/cache/{filter}/{path}

If I do a test on this url "http://my-project.fr/app.php/", the bundle works fine:

  1. The first time, I try to show the /app.php/media/cache/thumbnail/profile.jpg picture. The Symfony2 route is caught. The bundle return the cropped picture and cache it.
  2. The second time, the route is caught again and the bundle redirects me to the cached picture /media/cache/

In short, the first time /app.php/media/cache -> bundle, and second time /media/cache -> assets

But in production environment, app.php is missing so how the bundle can do the difference ?


Solution

  • The -f option does not exist in lighttpd so I switch to apache2 and everything work well.