# Visual studio code is saying svg image import is typescript error 2307

visual-studio-code

I have a React/Typescript component in which I import an svg (this is built with Webpack's HtmlWebpackInlineSVGPlugin).

import RN_Logo from '../../../public/images/RN_logo.svg';


which I use later on in my render function

<img src={RN_Logo} className="RN__Logo"/>


And it works fine, renders when I build and everything. However the file in VS Code is red, and that line importing it is red and when I hover that line it says

Cannot find module '../../../public/images/RN_logo.svg'. ts(2307)


which is irritating, since it works I can't help but think the error message and marking of the line is wrong and should be turned off – is there a way to do that, preferably one that allows VS code to understand about imported image assets?

/// <reference path="../../../../custom.d.ts" />