Interesting. This script does basically what the src parameter does. I checked caniuse.com for datauri and it seems that Internet Explorer and Firefox have issues with them.
They propose you urlencode the code. I don’t think Hugo has (yet?) a function like this, but the search in this forum brought up this:
Try:
{{ .Params.logo | safeURL }}
I wonder if that has issues because your string is not a URL… If that does not work I am out of ideas We’ll wait for someone else to come to help