You are writing data to client other than the image. Specifically, this line:
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
You browser tries to render the content as a JPEG, but fails because of this extra data, so it prompts you to download it instead. Remove it and the picture will be displayed correctly.
You should also follow @Mellow Marmot's suggestion and use
w.Write(p) instead of