New course! Every coder should learn Generative AI!
Try a free lesson0
How to load an image in javascript
3 Answers
+ 4
You can store path to image inside variable and assign it to src of img tag.
If this is what you try to do
+ 1
var img= new Image();