Answer the question
In order to leave comments, you need to log in
Why is the image not being inserted in TypeScript?
Good day!
I'm digging into the project on TS now, I need to make edits, before that I never worked with TS. Faced the following problem - it is necessary to replace the image on the site. In the code, all images are inserted like this:
If I change src=${main_2} to ${name_of_my_image} - an error pops up, the image is not searched, although I put it in the same folder where the previous image was. What could be the problem?
Answer the question
In order to leave comments, you need to log in
<img class=${styles.image_2} src={`./ваш_путь/до/картинки`} alt='chip'/>
main_2 = "путь/до_картинки";
<img class=${styles.image_2} src=${main_2} alt='chip'/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question