For example, you can encode image as
base64 and insert it in some text file. I don't think it can make a whole lot of sense. At least, I hope you are not expecting that customary text editors will show an image for you. :-)
If you want some further detail, you will have to provide detail motivation and explanation of the ultimate goal of this weird activity; I don't want to waste time on something unless I know for sure it can really help someone. If the question is based on some misconception (who knows?), I would prefer to explain it and suggest some alternatives.
—SA