Load a default image when not picked

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!

7 Likes