# Writing Base64 Image in Params

**URL:** <https://discourse.gohugo.io/t/writing-base64-image-in-params/13578>\
**Category:** support\
**Created:** [August 14, 2018, 11:42am UTC](https://discourse.gohugo.io/t/writing-base64-image-in-params/13578 "2018-08-14T11:42:29Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [August 14, 2018, 12:39pm UTC](https://discourse.gohugo.io/t/writing-base64-image-in-params/13578/7 "2018-08-14T12:39:13Z")

</div>

Interesting. This script does basically what the src parameter does. I checked [caniuse.com](http://caniuse.com) for datauri and it seems that Internet Explorer and Firefox have issues with them.

> **[Can I use... Support tables for HTML5, CSS3, etc](https://caniuse.com/#feat=datauri)**
>
> "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.

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:

> [@How do I encode a URL in frontmatter?](https://discourse.gohugo.io/t/how-do-i-encode-a-url-in-frontmatter/2552):
>
> I have the following front matter in a page: +++ authorurl=“[http://foo.bar](http://foo.bar)” +++ In my partial I have: “url”:"{{ .Params.authorurl }}" I get in the output: “url”:“[http://foo.bar](http://foo.bar)” (Some lines above are omitted for clarity) What do I need to do to get “url”:“[http://foo.bar](http://foo.bar)” in the output?

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 🙂

---

_[View the full topic](https://discourse.gohugo.io/t/writing-base64-image-in-params/13578)._
