# Alternate default images for profile list

**URL:** <https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035>\
**Category:** Ask for Help\
**Created:** [April 28, 2020, 7:14pm UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035 "2020-04-28T19:14:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandonley](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@brandonley](https://community.glideapps.com/u/brandonley)\
**Post date:** [April 28, 2020, 7:14pm UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/1 "2020-04-28T19:14:34Z")

</div>

I have a list of student in my app. The teacher sets up the list. Each student’s profile has an image. When there is no image for a student profile, a default is provided using If-Else-Column as described here: [Add default picture URL to profile page](https://community.glideapps.com/t/add-default-picture-url-to-profile-page/2406).

However, if I have 5 students all having the same profile picture, the student list looks pretty boring. Is there a way to randomly or sequentially select the default image from a list?

I was trying to do something like:

if(image is empty AND name starts with “A”) then image A  
if(image is empty AND name starts with “B”) then image B

However, I could not figure out how to do the AND in the IF condition.

Anybody has a workaround?

---

<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:** [April 28, 2020, 7:53pm UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/2 "2020-04-28T19:53:56Z")

</div>

Yes! I was just researching this yesterday. There are avatar generators out there that will output a unique avatar based on text (so as long as there’s text to go off of —user name, eg.— each user can have their own, unique, default avatar).

eg. [https://www.tinygraphs.com/](https://www.tinygraphs.com/)

If you look at my Avatar Builder concept app, you can see that I built in new functionality to create one within Glide. However, you can simply prepopulate avatars using a name or email address as part of the tinygraph avatar template.

> **[Avatars](https://avatars.staging.glideapp.io/)**
>
> Various Ways to Build an Avatar!

---

<div class="post-metadata">

**Author:** ![brandonley](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@brandonley](https://community.glideapps.com/u/brandonley)\
**Post date:** [April 29, 2020, 2:20am UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/3 "2020-04-29T02:20:49Z")

</div>

Thanks. Interesting idea. I presume you are planing for the teacher to select the parameters that are included in the URL?

I was hoping we could just call the URL and it would return a different image either per user or each time it is called. I tried this service: [https://source.unsplash.com](https://source.unsplash.com).

Unfortunately, Glide caches the image per URL. That means once I get an image, it will be reused by Glide over and over again.

---

<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:** [April 29, 2020, 2:39am UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/4 "2020-04-29T02:39:08Z")

</div>

That’s correct. It’s just using a template column that combines the URL with the user parameters to form a unique URL per user. I wonder if Unsplash has something similar…trouble is, it would need to ensure that it’s school appropriate 😁

---

<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:** [April 29, 2020, 2:41am UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/5 "2020-04-29T02:41:48Z")

</div>

Could try [https://source.unsplash.com/featured/?cat,USERNAME](https://source.unsplash.com/featured/?cat,USERNAME) …that should be safe…

---

<div class="post-metadata">

**Author:** ![brandonley](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@brandonley](https://community.glideapps.com/u/brandonley)\
**Post date:** [April 29, 2020, 8:05am UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/6 "2020-04-29T08:05:26Z")

</div>

But how do I add the username to the url dynamically in the If-Else-Column?

---

<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:** [April 29, 2020, 10:25am UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/7 "2020-04-29T10:25:45Z")

</div>

You don’t. You create a template column first. In the example of the [Adorable.io](http://Adorable.io), the URL is as follows: `https://api.adorable.io/avatars/285/`_ **KEYWORD** _`.png`

In a template column, I’ll just replace KEYWORD with the username or email address. Then, use the template column in the if-then-else column.

---

<div class="post-metadata">

**Author:** ![brandonley](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@brandonley](https://community.glideapps.com/u/brandonley)\
**Post date:** [April 29, 2020, 11:16am UTC](https://community.glideapps.com/t/alternate-default-images-for-profile-list/8035/8 "2020-04-29T11:16:30Z")

</div>

Thanks a lot @Robert_Petitto. Glide doesn’t like URL with commas. So unsplash is a no go. I will go with [adorable.io](http://adorable.io) for now.
