Images can contain meta information, e.g. in the IPTC or EXIF sections of JPEGs. If the author is stored there, you can find tools to access them. But e.g. posting the image in an internet forum might remove these sections automatically. Some other file formats can contain information about the source also, e.g. Word Docs, PDFs and text files, but this is optional. This means, that there is no reliable technique to recognize the author of a file.