"Source image not resolvable" 利布
"Source image not resolvable" Liip
对于 ezPlatform 2.5 项目(基于 Symfony 3.4),我需要导入和转换一些图像。我正在使用 LiipImagineBundle
的 2.2.0 版
我将图像存储在目录中:"web/images/typeA/"、"web/images/typeB/" 等...
这是我的配置:
liip_imagine:
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/web"
cache_prefix: "media/cache"
loaders:
default:
filesystem:
data_root: "%kernel.root_dir%/../web"
# - "%kernel.project_dir%/web"
# - "%kernel.project_dir%/web/images"
driver: gd
data_loader: default
cache: default
filter_sets:
# list of filters...
目录"web/images" 和子文件夹由 symfony 命令创建(源文件从 NFS 导入)。所以,如果它们还没有创建,我就会遇到错误:
In FileSystemLocator.php line 52:
Source image not resolvable "/path/to/project/www/web/images/typeA/image.jpg" in
root path(s) "/path/to/project/www/web"
我遇到了错误,我通过在 config/packages/liip_image.yaml
中设置以下内容解决了它:
liip_imagine :
resolvers :
default :
web_path : ~
loaders:
default:
filesystem:
data_root: "/" # <-- This setting
感谢您的回答。我已经这样修复了:
liip_imagine:
driver: "%liip_imagine_driver%"
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/web"
cache_prefix: assets/media/cache
loaders:
default:
filesystem:
data_root:
- "%kernel.root_dir%/../web"
对于 ezPlatform 2.5 项目(基于 Symfony 3.4),我需要导入和转换一些图像。我正在使用 LiipImagineBundle
的 2.2.0 版我将图像存储在目录中:"web/images/typeA/"、"web/images/typeB/" 等...
这是我的配置:
liip_imagine:
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/web"
cache_prefix: "media/cache"
loaders:
default:
filesystem:
data_root: "%kernel.root_dir%/../web"
# - "%kernel.project_dir%/web"
# - "%kernel.project_dir%/web/images"
driver: gd
data_loader: default
cache: default
filter_sets:
# list of filters...
目录"web/images" 和子文件夹由 symfony 命令创建(源文件从 NFS 导入)。所以,如果它们还没有创建,我就会遇到错误:
In FileSystemLocator.php line 52:
Source image not resolvable "/path/to/project/www/web/images/typeA/image.jpg" in
root path(s) "/path/to/project/www/web"
我遇到了错误,我通过在 config/packages/liip_image.yaml
中设置以下内容解决了它:
liip_imagine :
resolvers :
default :
web_path : ~
loaders:
default:
filesystem:
data_root: "/" # <-- This setting
感谢您的回答。我已经这样修复了:
liip_imagine:
driver: "%liip_imagine_driver%"
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/web"
cache_prefix: assets/media/cache
loaders:
default:
filesystem:
data_root:
- "%kernel.root_dir%/../web"