0

我尝试使用两个不同的图像小部件在单个页面上输入内容时得到了一个奇怪的结果:我可以使用 graphql 获取图像路径,但图像没有使用 gatsby-image 处理,这意味着我只得到一个包含路径的字符串,不是通常的对象。

只有一张图片的其他页面没有这个问题。也就是说,使用 gatsby-remark-images + gatsby-remark-relative-images + gatsby-image

我的 config.yml 的相关部分:

      - label: Impression 2D/3D
        name: impression
        file: src/content/impression.md
        fields:
          - label: Image Impression 3D
            name: image-3d
            widget: image
            allow_multiple: false
          - label: Présentation Impression 3D
            name: impression-3d
            widget: markdown
          - label: Image Impression 2D
            name: image-2d
            widget: image
            allow_multiple: false
          - label: Présentation Impression 2D
            name: impression-2d
            widget: markdown
4

0 回答 0