# Load a default image when not picked

**URL:** <https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285>\
**Category:** Ask for Help\
**Created:** [March 8, 2020, 7:34pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285 "2020-03-08T19:34:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spleenr\_Spleenr](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spleenr_spleenr/32/971_2.png) [@Spleenr\_Spleenr](https://community.glideapps.com/u/Spleenr_Spleenr)\
**Post date:** [March 8, 2020, 7:34pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/1 "2020-03-08T19:34:22Z")

</div>

Hi there,

I’m new to Glide and I’m starting with the Instagram look alike template to build my own app. I followed the dedicated tutorial but I still have some issues to do the same and to implement other things.

I wonder how I can proceed to display a default image if the user does not select one with the image picker, not to see a blank square in the feed.

Thanks for your help,  
Jérémy

---

<div class="post-metadata">

**Author:** ![Christophe\_HK](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/christophe_hk/32/4161_2.png) [@Christophe\_HK](https://community.glideapps.com/u/Christophe_HK)\
**Post date:** [March 8, 2020, 7:43pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/2 "2020-03-08T19:43:09Z")

</div>

Hi Jeremy,

For this purpose, it’s quite simple.

First, you have the image picker which allows your users to pick a profile image, pointing on a column. OK.

Add a template column in the Glide data editor, containing the image or url of the default picture.

Then, add an if/then/else column in the data editor : if “user image” is empty then “default image” else “user image”. This way, this if column will always contains an image, either the user’s one, either the default one.

In your app, the image component will point on the if/then/else column.

That’s it!

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [March 8, 2020, 8:00pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/3 "2020-03-08T20:00:29Z")

</div>

Great quick explanation. I’ve done this in some of my apps and it really gives a way more polished look (as opposed to the first letters of the users’ names). It’s especially awesome when doing a relation to the user profile. Having a default “person icon” next to the name really makes it look like a link to the person’s profile.

Only thing left to refine for profile images is the ability to set an image as the app user’s profile image (for the menu icon and comments icon).

---

<div class="post-metadata">

**Author:** ![Spleenr\_Spleenr](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spleenr_spleenr/32/971_2.png) [@Spleenr\_Spleenr](https://community.glideapps.com/u/Spleenr_Spleenr)\
**Post date:** [March 9, 2020, 11:47pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/4 "2020-03-09T23:47:14Z")

</div>

Hi Christophe,

Thank you for your help. It really seem the appropriate answer!  
However I can’t manage to do that part : “Ad_d a template column in the Glide data editor, containing the image or url of the default picture_.”

How to actually upload the image in the data editor (and not the Google sheet right?)?

Moreover, it seems that the image picker won’t point on the if/then/else column if it is absent from the Google sheet.

Thanks again for your help,

 ![Capture d’écran 2020-03-10 à 00.40.54](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/d/d0009c3f7e517d2bd95fb1113b0531b1b618b63c.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 10, 2020, 12:06am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/5 "2020-03-10T00:06:19Z")

</div>

You could do that. I prefer placing the image URL in a sheet of “Resources” that also include my choice component options. Then I use a single value data column to pull in the image.

---

<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:** [March 10, 2020, 12:14am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/6 "2020-03-10T00:14:27Z")

</div>

You are trying to place the location of the image from your desktop. You first need to either upload it to google drive and share it to get a public url. Or you could temporarily drag and drop the image into an image component, which will upload the image to glide’s firebase server, or you could temporarily use an image picker component to upload the image. Once the image is uploaded, you will have a url that you can use for the template column.

---

<div class="post-metadata">

**Author:** ![Christophe\_HK](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/christophe_hk/32/4161_2.png) [@Christophe\_HK](https://community.glideapps.com/u/Christophe_HK)\
**Post date:** [March 10, 2020, 6:05am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/7 "2020-03-10T06:05:13Z")

</div>

Exactly! My previous explanation misses this detail sorry 🙏

---

<div class="post-metadata">

**Author:** ![dmcrabby](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmcrabby/32/19959_2.png) [@dmcrabby](https://community.glideapps.com/u/dmcrabby)\
**Post date:** [October 15, 2022, 7:45pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/8 "2022-10-15T19:45:09Z")

</div>

THis used to work but stopped. Should I do the column and use if then? I had a default pic that is used until the user upload a new one.  
 ![Screen Shot 2022-10-15 at 3.43.49 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/7/e7d336bc97ccbd5876e321a4f42a3a92252c6e39.png)

---

<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:** [October 15, 2022, 11:49pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/9 "2022-10-15T23:49:05Z")

</div>

I would personally use an IF column instead of setting a default. Allows you to change that default value quickly without having update existing rows.

---

<div class="post-metadata">

**Author:** ![dmcrabby](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmcrabby/32/19959_2.png) [@dmcrabby](https://community.glideapps.com/u/dmcrabby)\
**Post date:** [October 16, 2022, 12:51am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/10 "2022-10-16T00:51:01Z")

</div>

Thanks Jeff. I have it set when someone adds a contact that it is a default image. Then when they upload a new photo it updates all the previous pictures with the new one.

---

<div class="post-metadata">

**Author:** ![dmcrabby](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmcrabby/32/19959_2.png) [@dmcrabby](https://community.glideapps.com/u/dmcrabby)\
**Post date:** [October 16, 2022, 12:51am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/11 "2022-10-16T00:51:30Z")

</div>

Just curious why it stopped working.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 16, 2022, 12:53am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/12 "2022-10-16T00:53:34Z")

</div>

So when you submit a new contact, that value isn’t written to the new row?

---

<div class="post-metadata">

**Author:** ![dmcrabby](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmcrabby/32/19959_2.png) [@dmcrabby](https://community.glideapps.com/u/dmcrabby)\
**Post date:** [October 16, 2022, 1:07am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/13 "2022-10-16T01:07:36Z")

</div>

I have a database where someone may meet someone more than once and it tracks each audition. The default is automatically written so there is always an image with a new contact. Once the user gets a photo of contact then they can edit the image and it updates all related images.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 16, 2022, 1:12am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/14 "2022-10-16T01:12:33Z")

</div>

Yes, but can you clarify more on the “stopped working” part? What’s the behaviour now?

---

<div class="post-metadata">

**Author:** ![dmcrabby](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmcrabby/32/19959_2.png) [@dmcrabby](https://community.glideapps.com/u/dmcrabby)\
**Post date:** [October 16, 2022, 1:24am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/15 "2022-10-16T01:24:42Z")

</div>

As my image shows, it used to have a default image. But the default image no longer shows up When adding a new contact. It adds contact with no image even though default is set.  
I tried 2 different urls where I have the image and neither work any more.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 16, 2022, 1:29am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/16 "2022-10-16T01:29:55Z")

</div>

So under the hood, it still sets the image link to the right column, but the image can’t be shown on the front end?

---

<div class="post-metadata">

**Author:** ![dmcrabby](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dmcrabby/32/19959_2.png) [@dmcrabby](https://community.glideapps.com/u/dmcrabby)\
**Post date:** [October 16, 2022, 8:34am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/17 "2022-10-16T08:34:05Z")

</div>

Correct the link to default image is correct but it does not appear when I create a new contact.

---

<div class="post-metadata">

**Author:** ![user19](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/user19/32/52319_2.png) [@user19](https://community.glideapps.com/u/user19)\
**Post date:** [January 22, 2023, 5:31pm UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/18 "2023-01-22T17:31:15Z")

</div>

so long.  
this problem still exist.

i have an image on goggle drive, that shared to any who know a link.  
this link written in " Default value"

but in new row cell is empty

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 24, 2023, 12:42am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/19 "2023-01-24T00:42:53Z")

</div>

What component do you use when you mention “default value”? What does your flow look like?

---

<div class="post-metadata">

**Author:** ![user19](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/user19/32/52319_2.png) [@user19](https://community.glideapps.com/u/user19)\
**Post date:** [January 25, 2023, 9:16am UTC](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285/20 "2023-01-25T09:16:42Z")

</div>

image picker. in right column we have a “default value”.  
i don’t get a link from database, i use “custom” and put this link:  
[https://drive.google.com/file/d/1N\_dkX010KdKxA76toKjRKFBjeB3w182t/view?usp=share\_link](https://drive.google.com/file/d/1N_dkX010KdKxA76toKjRKFBjeB3w182t/view?usp=share_link)  
but after save form (set new column) - all data saved, but not this cell - it’s become empty.

[Next page](https://community.glideapps.com/t/load-a-default-image-when-not-picked/5285.md?page=2)
