hasura / gatsby-gitbook-starter

Generate GitBook style modern docs/tutorial websites using Gatsby + MDX
https://hasura.io/learn/graphql/react/introduction/
MIT License
985 stars 376 forks source link

Double image rendering #25

Closed Nierusan closed 5 years ago

Nierusan commented 5 years ago

Hi ! I'm trying your really nice theme for documentation and I've got an annoying issue with images inside a mdx file.

When I import an image, there's always a good and bad version at the same time and I don't know how to remove the bad one.

Example : Image issue mdx file

I'm trying to tools with the plugin, but didn't found any solutions yet..

Thank you

gaboesquivel commented 5 years ago

https://github.com/gatsbyjs/gatsby/issues/11280

i001962 commented 5 years ago

@Nierusan I ran into the same issue and resolved it by updating gatsby-config.js https://github.com/gatsbyjs/gatsby/issues/15486

....
  'gatsby-plugin-styled-components',
  {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [ `gatsby-remark-images` ],
      }
    },
  {
    resolve: 'gatsby-plugin-mdx',
    options: {
      gatsbyRemarkPlugins: [
        {
          resolve: "gatsby-remark-images",
          options: {
            maxWidth: 1035
          }
        },
        {
          resolve: 'gatsby-remark-copy-linked-files'
        }
      ],
      extensions: [".mdx", ".md"]
    }
  },
  'gatsby-plugin-emotion',
....
Nierusan commented 5 years ago

Thank you very very very much !!!!