# Convert image Url from Glide to Base 64 with inetgromat

**URL:** <https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782>\
**Category:** Ask for Help\
**Created:** [July 11, 2023, 4:13pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782 "2023-07-11T16:13:21Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnaudebroas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arnaudebroas/32/52281_2.png) [@Arnaudebroas](https://community.glideapps.com/u/Arnaudebroas)\
**Post date:** [July 11, 2023, 4:13pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/1 "2023-07-11T16:13:22Z")

</div>

Hi everyone,

I am writing to you because I am trying to convert the profile photos of my users glide to Base64 with Make but I don’t know how to do it and I don’t know about Javascript. The goal is that it automatically converts which is why I use Make. Photos are URLs. Maybe one of you can help me?  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 11, 2023, 4:22pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/2 "2023-07-11T16:22:12Z")

</div>

Are you aware that you can do that in Glide with the Encode Text column?

> **[Glide • Encode Text column](https://www.glideapps.com/plugins/encode)**
>
> Encode text in a variety of formats.

---

<div class="post-metadata">

**Author:** ![Arnaudebroas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arnaudebroas/32/52281_2.png) [@Arnaudebroas](https://community.glideapps.com/u/Arnaudebroas)\
**Post date:** [July 11, 2023, 5:12pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/4 "2023-07-11T17:12:12Z")

</div>

Thank’s a lot, I didn’t know that I can do that with Encode text column .

---

<div class="post-metadata">

**Author:** ![Arnaudebroas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arnaudebroas/32/52281_2.png) [@Arnaudebroas](https://community.glideapps.com/u/Arnaudebroas)\
**Post date:** [July 11, 2023, 5:25pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/5 "2023-07-11T17:25:57Z")

</div>

Sorry I tried and it didn’t work. What should I put in the part "Encode (base64,url)? Because when I do: text = my column image  
Encode = base64  
the code the column returns to me does not work.

---

<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:** [July 11, 2023, 6:44pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/6 "2023-07-11T18:44:22Z")

</div>

That encodes the url, not the image itself, right? I’m not sure if you can encode an image inside of Glide. That would probably require javascript with an external library, or an external service.

I don’t have thoughts off the top of my head. I’ve done it manually with an external service, but not on a large scale.

---

<div class="post-metadata">

**Author:** ![NFNHello](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nfnhello/32/3371_2.png) [@NFNHello](https://community.glideapps.com/u/NFNHello)\
**Post date:** [July 11, 2023, 10:28pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/7 "2023-07-11T22:28:02Z")

</div>

First, I have to disclose that I don’t code, I found this bit after some heavy online searching. It’s for Zapier, but it might be enough for you to do something similar in Make. - [https://community.zapier.com/code-webhooks-52/converting-an-image-to-base64-3529](https://community.zapier.com/code-webhooks-52/converting-an-image-to-base64-3529)

---

<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:** [July 11, 2023, 11:08pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/8 "2023-07-11T23:08:48Z")

</div>

I did some research and this should work in a javascript column.

```auto
const getBase64FromUrl = async (url) => {
  const data = await fetch(url);
  const blob = await data.blob();
  return new Promise((resolve) => {
    const reader = new FileReader();
    reader.readAsDataURL(blob); 
    reader.onloadend = () => {
      const base64data = reader.result;   
      resolve(base64data);
    }
  });
}

return getBase64FromUrl(p1);

```

Just need to pass the image url in the p1 parameter.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 12, 2023, 12:53am UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/9 "2023-07-12T00:53:13Z")

</div>

> [@Jeff\_Hager](#):
>
> That encodes the url, not the image itself, right?

oh yeah, good point. hahaha 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![Arnaudebroas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arnaudebroas/32/52281_2.png) [@Arnaudebroas](https://community.glideapps.com/u/Arnaudebroas)\
**Post date:** [July 17, 2023, 8:40am UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/10 "2023-07-17T08:40:35Z")

</div>

Thanks for your answer, In fact I would like to encode the profile image from my Glide database so I don’t have the Url directly. Can I still use this code?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 17, 2023, 8:51am UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/11 "2023-07-17T08:51:50Z")

</div>

Yes.

Put the code that Jeff gave you in a JavaScript column, and use your profile image column as a replacement for p1.

Even though it might appear as an image in the Data Editor, the image URL will be passed to the JavaScript column.

---

<div class="post-metadata">

**Author:** ![Arnaudebroas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arnaudebroas/32/52281_2.png) [@Arnaudebroas](https://community.glideapps.com/u/Arnaudebroas)\
**Post date:** [July 17, 2023, 12:37pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/12 "2023-07-17T12:37:40Z")

</div>

It works ! Tank’s a lot.

---

<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:** [July 18, 2023, 12:38pm UTC](https://community.glideapps.com/t/convert-image-url-from-glide-to-base-64-with-inetgromat/63782/13 "2023-07-18T12:38:32Z")

</div>

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