Liip 想象调整大小的捆绑问题
Liip imagine bundle problems with resizing
我在 运行 命令 php bin/console liip:imagine:cache:resolve public/images/5e57925688ede894214180.png --filter=thumbnail
时得到的错误是 `
public/images/5e57925688ede894214180.png[thumbnail] (failed) Source
image not resolvable "public/images/5e57925688ede894214180.png" in
root path(s) "/app/public"
`在控制器中,我尝试使用这行代码
$resizeImage = $this->filterService->getUrlOfFilteredImage($this->kernel->getProjectDir().$image->getUrl(), $filter[$i]);
我收到这个错误:
Source image not resolvable "/app/public/images/dw-5e5e15d6a52f8.png"
in root path(s) "/app/public"
routes/liip_imagine.yaml 文件看起来像这样
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"
packages/liip_imagine.yaml look like this
liip_imagine:
driver: imagick #options: imagick or gd
resolvers:
default:
web_path: ~
filter_sets:
cache: ~
# the name of the "filter set"
thumbnail:
# adjust the image quality to 75%
quality: 75
# list of transformations to apply (the "filters")
filters:
# create a thumbnail: set size to 120x90 and use the "outbound" mode
# to crop the image when the size ratio of the input differs
thumbnail:
size: [256, 256]
mode: outbound
allow_upscale: true
large_m:
filters:
scale:
dim: [2048,2048]
图片在路径 public/images
路径是路径必须经过的问题 images/dw-5e5e15d6a52f8.png
而路径前面没有 public
我在 运行 命令 php bin/console liip:imagine:cache:resolve public/images/5e57925688ede894214180.png --filter=thumbnail
时得到的错误是 `
public/images/5e57925688ede894214180.png[thumbnail] (failed) Source image not resolvable "public/images/5e57925688ede894214180.png" in root path(s) "/app/public"
`在控制器中,我尝试使用这行代码
$resizeImage = $this->filterService->getUrlOfFilteredImage($this->kernel->getProjectDir().$image->getUrl(), $filter[$i]);
我收到这个错误:
Source image not resolvable "/app/public/images/dw-5e5e15d6a52f8.png" in root path(s) "/app/public"
routes/liip_imagine.yaml 文件看起来像这样
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"
packages/liip_imagine.yaml look like this
liip_imagine:
driver: imagick #options: imagick or gd
resolvers:
default:
web_path: ~
filter_sets:
cache: ~
# the name of the "filter set"
thumbnail:
# adjust the image quality to 75%
quality: 75
# list of transformations to apply (the "filters")
filters:
# create a thumbnail: set size to 120x90 and use the "outbound" mode
# to crop the image when the size ratio of the input differs
thumbnail:
size: [256, 256]
mode: outbound
allow_upscale: true
large_m:
filters:
scale:
dim: [2048,2048]
图片在路径 public/images
路径是路径必须经过的问题 images/dw-5e5e15d6a52f8.png
而路径前面没有 public