Using an asset as a fallback photo for a result card

Hello!

One of my clients has a resources vertical with blog posts, case studies, and other related content. In the resource card data mappings, I am currently null checking for an image and using a fallback image URL if there is no specific image uploaded for the entity. I have a new image I need to use instead, but it does not have a URL.

Is it possible to upload this image as an asset and map the asset as the fallback for the card?

Thanks,
DJ

Resolved by adding a custom field for the fallback image to all resource entities, then using a null check as shown below:

image: profile.photo ? Formatter.image(profile.photo).url : Formatter.image(profile.fallbackimage).url

1 Like

Hey @DJ_Corbett thanks for sharing your solution. I imagine others will find this useful going forward!