Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images not found with version 2 #51

Open
AndrewTraub opened this issue Mar 31, 2021 · 1 comment
Open

Images not found with version 2 #51

AndrewTraub opened this issue Mar 31, 2021 · 1 comment

Comments

@AndrewTraub
Copy link

AndrewTraub commented Mar 31, 2021

I'm using netlify and have followed your instructions but the images are not found.

Here is my gatsby-config:

module.exports = {
  plugins: [
    'gatsby-plugin-react-helmet',
    'gatsby-transformer-yaml',
    {
      resolve: 'gatsby-plugin-google-tagmanager',
      options: ...
    },
    {
      resolve: 'gatsby-plugin-offline',
      options: ...
    },
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        ...
      }
    },
    // Add static assets before markdown files and images
    {
      resolve: 'gatsby-source-filesystem',
      options: {
        path: `${__dirname}/static/assets`,
        name: 'images'
      }
    },
    {
      resolve: 'gatsby-source-filesystem',
      options: {
        path: `${__dirname}/content`,
        name: 'pages'
      }
    },
    // images
    'gatsby-plugin-image',
    'gatsby-plugin-sharp',
    'gatsby-transformer-sharp',
    {
      resolve: 'gatsby-transformer-remark',
      options: {
        plugins: [
          // gatsby-remark-relative-images must
          // go before gatsby-remark-images
          'gatsby-remark-relative-images',
          {
            resolve: 'gatsby-remark-images',
            options: {
              maxWidth: 800,
              linkImagesToOriginal: false
            }
          },
          `gatsby-remark-responsive-iframe`
        ]
      }
    },
    {
      resolve: `@leomanlapera/gatsby-source-yelp`,
      options: {
        ...
      }
    },
    {
      resolve: 'gatsby-plugin-nprogress',
      options: {
        ...
      }
    },
    'gatsby-plugin-sitemap',
    {
      resolve: 'gatsby-plugin-netlify-cms',
      options: {
        ...
      }
    },
    'gatsby-plugin-netlify' // make sure to keep it last in the array
  ]
}
@AndrewTraub
Copy link
Author

It works with version 0.3 but not 2.x and 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant