Javascript 盖茨比博客图片未显示
我有一个问题,最近如果我在我的入门博客上发表一篇来自盖茨比的新文章,图片就不会出现。我认为这是因为路径生成错误,但我不知道为什么。这就是它的样子: 它生成如下路径: 资产/estado de animo whatsapp movil-.png 然后把它放在最前面,把它修好。但我如何在代码中实现这一点? 这是我的盖茨比配置js文件:Javascript 盖茨比博客图片未显示,javascript,reactjs,gatsby,Javascript,Reactjs,Gatsby,我有一个问题,最近如果我在我的入门博客上发表一篇来自盖茨比的新文章,图片就不会出现。我认为这是因为路径生成错误,但我不知道为什么。这就是它的样子: 它生成如下路径: 资产/estado de animo whatsapp movil-.png 然后把它放在最前面,把它修好。但我如何在代码中实现这一点? 这是我的盖茨比配置js文件: module.exports = { siteMetadata: { title: `Julieta`, author: `Datank.ai`, descri
module.exports = {
siteMetadata: {
title: `Julieta`,
author: `Datank.ai`,
description: `Toma el control de tu tiempo y el de tu equipo. Haz que tus reuniones remotas sean productivas con julieta. `,
siteUrl: `https://gatsby-starter-blog-demo.netlify.com/`,
social: {
twitter: `kylemathews`,
},
},
plugins: [
`gatsby-plugin-netlify-cms`,
`gatsby-plugin-styled-components`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-offline`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-feed-mdx`,
`gatsby-plugin-material-ui`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content/blog`,
name: `blog`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content/assets`,
name: `assets`,
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [".mdx", ".md"],
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 590,
},
},
{
resolve: `gatsby-remark-responsive-iframe`,
options: {
wrapperStyle: `margin-bottom: 1.0725rem`,
},
},
{
resolve: `gatsby-remark-vscode`,
},
{
resolve: `gatsby-remark-copy-linked-files`,
},
{
resolve: `gatsby-remark-smartypants`,
},
],
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
// edit below
// trackingId: `ADD YOUR TRACKING ID HERE`,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Gatsby Starter Blog`,
short_name: `GatsbyJS`,
start_url: `/`,
background_color: `#ffffff`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/icon-julieta.png`,
},
},
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography`,
},
},
{
resolve: "gatsby-plugin-google-tagmanager",
options: {
id: "GTM-K7RX7DH",
includeInDevelopment: false,
},
},
],
}
这是我的文件树目录
帖子在内容/资产中,图片在静态/资产和公共/资产中,也许我在这里做错了什么?你是如何导入的?你能分享代码吗?