Base64 represents binary data using 64 printable characters, so an image can be pasted anywhere text is allowed: inside HTML, CSS, JSON, an email template or a config file. The image itself is not changed; the bytes of your file are encoded exactly, and decoding the text gives back an identical file.
The encoding is not compression and not encryption. Every 3 bytes become 4 characters, so the text is about a third larger than the file (plus a few bytes for the prefix). Anyone can decode it.