# How to insert an image in the Displayhtml function?

**URL:** <https://community.blockcerts.org/t/how-to-insert-an-image-in-the-displayhtml-function/1197>\
**Category:** Technical\
**Created:** [July 14, 2018, 4:44am UTC](https://community.blockcerts.org/t/how-to-insert-an-image-in-the-displayhtml-function/1197 "2018-07-14T04:44:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/julian/32/446_2.png) [@Julian](https://community.blockcerts.org/u/Julian)\
**Post date:** [July 14, 2018, 4:44am UTC](https://community.blockcerts.org/t/how-to-insert-an-image-in-the-displayhtml-function/1197/1 "2018-07-14T04:44:29Z")

</div>

Hi everyone!  
Im using sandoche repository ([https://github.com/sandoche/cert-tools](https://github.com/sandoche/cert-tools)) to tryout the visualization feature of blockcerts, so far ive used his examples and managed to make an html copy of the certificate, but im having a hard time with pasting and image, Does anyone know? I dont know if I need to store the image localy in my device, in the JSON or in a web service.  
I uploaded the image to [https://imgbb.com/](https://imgbb.com/) and coded  
\< img src=“url” alt=“certificate\_image”/\>  
But when I try to create a Template using this config, I get an error.  
Thanks again for all the help!  
 ![17](https://us1.discourse-cdn.com/flex016/uploads/blockcerts/original/1X/24ff153acd696d1a0b9d05e1df1b3d42fabcb4fd.jpeg)

---

<div class="post-metadata">

**Author:** ![GuillaumeDuveau](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/guillaumeduveau/32/485_2.png) [@GuillaumeDuveau](https://community.blockcerts.org/u/GuillaumeDuveau)\
**Post date:** [July 18, 2018, 2:23pm UTC](https://community.blockcerts.org/t/how-to-insert-an-image-in-the-displayhtml-function/1197/2 "2018-07-18T14:23:38Z")

</div>

Hi, inserting the image data directly in the JSON works well.

```
<img src="data:image/png;base64...
```

---

<div class="post-metadata">

**Author:** ![Julian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/julian/32/446_2.png) [@Julian](https://community.blockcerts.org/u/Julian)\
**Post date:** [July 18, 2018, 2:55pm UTC](https://community.blockcerts.org/t/how-to-insert-an-image-in-the-displayhtml-function/1197/3 "2018-07-18T14:55:28Z")

</div>

> [@GuillaumeDuveau](#):
>
> inserting the image data directly in the JSON works well.

I’ll try to do that! When I try to use the “create template” function, it gave me an error.  
If I succed I’ll post an Image 🙂  
Thank you for the help!

---

<div class="post-metadata">

**Author:** ![dekts](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dekts](https://community.blockcerts.org/u/dekts)\
**Post date:** [March 18, 2020, 7:08am UTC](https://community.blockcerts.org/t/how-to-insert-an-image-in-the-displayhtml-function/1197/4 "2020-03-18T07:08:19Z")

</div>

which JSON @GuillaumeDuveau?

The unsigned certificate json or the test.json
