Project Weather App

Please, can someone explain why the weather icon isn’t showing? I’ve been stuck on this for hours! :sleepy:

Change this:

weatherIcon.textContent = `<img src="icons/${icons}.png"/>`

to this:

weatherIcon.innerHTML = `<img src="icons/${icons}.png"/>`

Oh wow! Thanks, that worked, but now it shows a tiny image instead of the actual weather icon

codepen doesn’t have access to your file system, you need to store your image online and provide link to the image. For example here:

1 Like