reactjs - 如何防止 Gatsby 图像在每次重新加载时模糊 Logo ?

标签 reactjs gatsby

我已经阅读了 gatsby-image 文档,但不知道如何关闭某些东西。默认情况下,gatsby-image 似乎会加载图像的缩略图,然后逐步加载图像。基本上是一个很好的占位符效果。但我发现每次换页时我的标志都会变得模糊。这是我的代码:

 <StaticQuery
            query={graphql`
              query {
                file(relativePath: { eq: "appendto_logo.png" }) {
                  childImageSharp {
                    # Specify the image processing specifications right in the query.
                    # Makes it trivial to update as your page's design changes.
                    fixed(width: 150) {
                      ...GatsbyImageSharpFixed
                    }
                  }
                }
              }
            `}
            render={data => <Img fixed={data.file.childImageSharp.fixed} />}
          />

有什么想法吗?如何防止这种模糊效果?或者缩略图加载效果...

最佳答案

切换到 GatsbyImageSharpFixed_noBase64解决了它(而不仅仅是 ...GatsbyImageSharpFixed )

关于reactjs - 如何防止 Gatsby 图像在每次重新加载时模糊 Logo ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55839971/

相关文章:

javascript - 自动完成弹出窗口内的 Material-UI 选项卡

unit-testing - 如何测试样式组件?

reactjs - reactjs在播放时更改音频的currentTime

google-analytics - “gatsby-plugin-google-analytics”不适用于我的 gatsby-strapi 网站

reactjs - 使用 gatsby-image 图像加载缓慢

undefined - 类型错误 : Cannot read property 'allMarkdownRemark' of undefined - on Gatsby

html - 使用 React 应用程序的 get 方法在 Material UI 表中显示数据

javascript - 我得到体育冠军和第三名的空值

javascript - 将 GraphQL 数据拉入 gatsby-browser.js(或请提供更好的解决方案)

javascript - 如何在 React Slick slider 中为自动播放添加初始延迟?