小编Swa*_*osh的帖子

Gatsby build 总是抛出 Input file is missing or an unsupported image format

问题的完整描述可以在这里找到https://github.com/gatsbyjs/gatsby/issues/5638

简而言之,我正在使用gatsby-plugin-remarkgatsby-transformer-remark优化放置在 md 文件前端的图像。

说我的降价文件有

---
title: Beautiful UI
featured_image: ../../images/project-vscbui.png
subtitle: A set of color themes for VSCode
order: 90
link: https://vscbui.rocks
templateKey: projects
---

...
Run Code Online (Sandbox Code Playgroud)

我像这样查询

export const projectQuery = graphql`
  query ProjectQuery {
    projects: allMarkdownRemark(
      sort: { order: DESC, fields: [frontmatter___order] }
      filter: { frontmatter: { templateKey: { eq: "projects" } } }
      limit: 1000
    ) {
      edges {
        node {
          id
          frontmatter {
            title
            subtitle
            featured_image {
              childImageSharp {
                sizes(maxWidth: 960) …
Run Code Online (Sandbox Code Playgroud)

gatsby

5
推荐指数
1
解决办法
3081
查看次数

标签 统计

gatsby ×1