liip / LiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library
http://liip.ch
MIT License
1.66k stars 378 forks source link

Web_root outside not working #1521

Open devcut opened 1 year ago

devcut commented 1 year ago

I try to set web_root outside public folder but the bundle continue to create folder in public.

Versions:

  1. Bundle version : 2.11
  2. PHP: 8.2

This is my configuration :

private function initLiipImagine(ContainerBuilder $container): void
    {
        $bundles = $container->getParameter('kernel.bundles');

        if (!isset($bundles['LiipImagineBundle'])) {
            return;
        }

        $container->prependExtensionConfig('liip_imagine', [
            'resolvers' => [
                'default' => [
                    'web_path' => [
                        'web_root' => $container->getParameter('kernel.project_dir').'/data',                    ],
                ],
            ],
            'loaders' => [
                'default' => [
                    'filesystem' => [
                        'data_root' => $container->getParameter('kernel.project_dir').'/data/uploads',
                        'allow_unresolvable_data_roots' => true
                    ],
                ],
            ],
            'filter_sets' => [
                'cache' => null,
                '90' => [
                    'cache' => 'default',
                    'filters' => [
                        'thumbnail' => [
                            'size' => [
                                90,
                            ],
                            'mode' => 'outbound',
                        ],
                    ],
                ],
                '150' => [
                    'cache' => 'default',
                    'filters' => [
                        'thumbnail' => [
                            'size' => [
                                150,
                            ],
                            'mode' => 'outbound',
                        ],
                    ],
                ],
            ],
        ]);
    }