title: Gatsby with Typescript importing assets error (ts2307)
body: <p>I am trying to add images using <strong>import</strong></p>
  <pre><code>import image from '../assets/images/picture.jpg 
  </code></pre>
  <p>am using Typescript with gatsby ... the strange thing is <strong>it works fine with normal javascript</strong> (<strong>.js  ~ .jsx file</strong>) but when I use (<strong>.ts ~ .tsx file</strong>) it throw out this error</p>
  <blockquote>
  <p>Cannot find module '../assets/images/picture.jpg' or its corresponding type declarations.<strong>ts(2307)</strong></p>
  </blockquote>
  <p>The strange thing is it works fine with normal components like</p>
  <pre><code>import Header from '../components/Header'
  </code></pre>
  <p>here is my <strong>tsconfig.json</strong> file</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;module&quot;: &quot;commonjs&quot;,
      &quot;target&quot;: &quot;esnext&quot;,
      &quot;jsx&quot;: &quot;preserve&quot;,
      &quot;lib&quot;: [
        &quot;dom&quot;,
        &quot;es2015&quot;,
        &quot;es2017&quot;
      ],
      &quot;strict&quot;: true,
      &quot;noEmit&quot;: true,
      &quot;isolatedModules&quot;: true,
      &quot;esModuleInterop&quot;: true,
      &quot;skipLibCheck&quot;: true,
      &quot;noUnusedLocals&quot;: true,
      &quot;noUnusedParameters&quot;: true,
      &quot;removeComments&quot;: false,
      &quot;preserveConstEnums&quot;: true
    },
    &quot;include&quot;: [
      &quot;./src/**/*&quot;
    ]
  }
  </code></pre>
  <p>and here is <strong>gatsby-config.json file</strong></p>
  <pre><code>module.exports = {
    /* Your site config here */
    plugins: [
      {
        resolve: `gatsby-plugin-typescript`,
        options: {
          isTSX: true, // defaults to false
          jsxPragma: `jsx`, // defaults to &quot;React&quot;
          allExtensions: true, // defaults to false
        },
        
      },
    ],
  }
  </code></pre>
  <p><strong>folder Structure</strong></p>
  <ul>
  <li>src
  <ul>
  <li>components
  <ul>
  <li>MainComponent.tsx</li>
  <li>Header.tsx</li>
  </ul>
  </li>
  <li>assets
  <ul>
  <li>images
  <ul>
  <li>picture.jpg</li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>