diff --git a/README.md b/README.md index 521dbb7a7..d153939dd 100644 --- a/README.md +++ b/README.md @@ -296,6 +296,29 @@ liip_imagine: For an example of a filter loader implementation, refer to `Liip\ImagineBundle\Imagine\Filter\Loader\ThumbnailFilterLoader`. +## Outside the web root + +When your setup requires your source images to live outside the web root, or if that's just the way you roll, +you can override the DataLoader service and define a custom path, as the third argument, that replaces +`%liip_imagine.web_root%` (example here in XML): + +``` xml + + + + %liip_imagine.formats% + %kernel.root_dir%/data/uploads + +``` + +One way to override a service is by redefining it in the services configuration file of your bundle. +Another way would be by modifying the service definition from your bundle's Dependency Injection Extension: + +``` php +$container->getDefinition('liip_imagine.data.loader.filesystem') + ->replaceArgument(2, '%kernel.root_dir%/data/uploads'); +``` + ## Custom image loaders The ImagineBundle allows you to add your custom image loader classes. The only