That function doesn't need a particular location. It just needs to be available to the code that needs it. So it's up to you where to put it.
As I recall, that output from the function is the correct output. It encodes the image into text and tells the img tag to load it from there when you put it in its src tag.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey sorry for the slow response.
That function doesn't need a particular location. It just needs to be available to the code that needs it. So it's up to you where to put it.
As I recall, that output from the function is the correct output. It encodes the image into text and tells the img tag to load it from there when you put it in its src tag.