简体   繁体   English

无法将图像保存到 drupal 8 中的样式文件夹

[英]unable to save images to style folder in drupal 8

when I attempt to view images in drupal 8 I am not able to see in any style, image style folder has been created however images are not saving in this folder I set permission 777 clear cache many time but did not work当我尝试查看 drupal 8 中的图像时,我无法看到任何样式,图像样式文件夹已创建,但图像未保存在此文件夹中我多次设置权限 777 清除缓存但没有工作

"image style folder has been created". “已创建图像样式文件夹”。 You need to create the style first,(Configuration-> media -> image style) and then associate it with your custom image field in "manage display" (structure -> content type -> 'yourcontenttype' -> manage display).您需要先创建样式,(配置-> 媒体-> 图像样式),然后将其与“管理显示”中的自定义图像字段关联(结构-> 内容类型-> 'yourcontenttype' -> 管理显示)。

PS: if you are invoking your image directly through the twig template, must add some code, like this: PS:如果你是通过 twig 模板直接调用你的镜像,必须添加一些代码,像这样:

<img src={{ 'myimage.jpg' | image_style('image_style_machine_name') }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM