如何在 Redactor 编辑器中更改图像路径?

How to change image paths in Redactor editor?

我在 CraftCMS 中使用 Redactor 编辑器来写博文。当我在 Redactor 中插入图像时,详细信息博客页面上的 URLs 是错误的(相对路径),甚至在 CMS 的 Redactor 编辑器中,在上传图像的上传目录之前缺少 /。

如何在 URL 的开头添加斜杠或将它们设置为使用绝对路径?

博文的 URL 看起来像 www.website。com/blog/post-name

这是我的 json Redactor 配置:

{
  "buttons": ["formatting", "bold", "italic", "unorderedlist", "orderedlist", "link", "image", "video", "html"],
  "plugins": ["fullscreen", "video"],
  "linkNewTab": true,
  "toolbarFixed": true,
  "imageFigure": false,
}

谢谢。

首先,您应该检查您的 Redactor 字段是否设置为使用您的图像资产卷:

如果是,则问题不在于 Redactor,而在于您的资产量设置。图像的文件系统路径及其 URL 由资产卷上的设置决定: