Default or fallback image

Hi

Is there a way of providing a fallback image for a field? Say there is no supplied featured image for a blog post, could Dato instead complete the field with a generic image?

We have 2 options that I can identify otherwise, neither are ideal in my view:
a) pull directly from the media library. But if anyone deletes that media item, there’s no way of knowing it’s happened
b) we could continue to source it from a local file but it’ll require dev work when they want to change the default

Let me know if this feature exists otherwise I’ll request it.

Ben

hey @ben.read have you tried deleting an asset that is currently used? It’s not permitted, so it should not happen. Did you experience otherwise?

Would that solve your issue?

Hi Matteo,

Is Dato aware if it’s used via API call only?

Thanks

Ben

no @ben.read :frowning:

But if you have used the asset inside a record we do. Only if you fetch assets directly, is this something that you do?

As I thought. No, the plan wasn’t to use it inside a record, but to potentially pull it directly. That’s OK we can work around it.