Base64.encode64 adds unneded newlines. Discourse can handle the newlines, so this does not change the behaviour.