How can I use the <img>
tag to display a local image in Go?
I've tried the following:
fmt.Fprintf(w, "</br><img src='" + path.Join(rootdir, fileName) + "' ></img>")
where rootdir = os.Getwd() and fileName is the name of the file.
If I try http.ServeFile
with the same path then I can download the image, however I would like to embed it in the webpage itself.