Base64 encoded large binary data (like images) should NOT be included directly in the Custom Tile source code. The Custom Tile source code is ultimately stored in a database which means it’s not well suited for binary data and you’ll quickly hit the per document (database entry) size limit.
I would recommend uploading the files somewhere and then reference those sources. If you have a NAS or some other file server on your network, you might be able to use that. Otherwise I would recommend using an online image hosting service. For example, I use Imgur for quickly hosting screenshots or background images.