# Decode base64 image

**URL:** https://community.glideapps.com/t/decode-base64-image/47098
**Category:** Ask for Help
**Created:** [August 18, 2022, 8:01am UTC](https://community.glideapps.com/t/decode-base64-image/47098 "2022-08-18T08:01:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mike](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mike/32/45713_2.png) [@mike](https://community.glideapps.com/u/mike)
#### Post date: [August 18, 2022, 8:01am UTC](https://community.glideapps.com/t/decode-base64-image/47098/1 "2022-08-18T08:01:07Z")

</div>

Hi,

the response of an API got an image field like  
`"image":"data:image/jpeg;base64,/9j/4AAQSkZJ....`  
Any chance to tell glide to decode it or use it in a component so the user will see the image?

Cheers,

Mike

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [August 18, 2022, 2:02pm UTC](https://community.glideapps.com/t/decode-base64-image/47098/2 "2022-08-18T14:02:43Z")

</div>

I believe you can just extract the “data:image…” node and display it in an image component as is. No need to decode it.

---

<div class="post-metadata">

### Author: ![mike](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mike/32/45713_2.png) [@mike](https://community.glideapps.com/u/mike)
#### Post date: [August 18, 2022, 4:12pm UTC](https://community.glideapps.com/t/decode-base64-image/47098/3 "2022-08-18T16:12:54Z")

</div>

Indeed it works. The problem was the importJSON script which truncated this field to 256 chars.

Cheers

Mike

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [August 19, 2022, 4:13pm UTC](https://community.glideapps.com/t/decode-base64-image/47098/4 "2022-08-19T16:13:19Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
