Alt text for dynamic images from airtable

Hello Softr community!

Is there a way to include alt text for dynamic images?

For static images it’s super easy but I’m not finding the same option for dynamic images, specifically within a list detail block.

Thanks in advance!

I’m assuming this is impossible?

Hey @JohnK,

It is not possible currently, I will add this as a feature request.

Thanks :slight_smile:

Thanks for the response, Suzie! Standing by for the update :slight_smile:

1 Like

My pleasure @JohnK :slight_smile:

Hang on, not so fast, this is in fact doable. Here’s a quick tutorial.

Assumptions: you have a Airtable table with an field of type Attachment, named “Image”, with one image in it, and you have a field of type Single Line Text, named “Alt Text”, containing the alt text for that image.

First, add a Formula field named “Img Tag”, with the following formula:

"<img src='" & MID({Image}, 1+FIND("(", {Image}),LEN({Image})- (1+FIND("(", {Image})))&"' alt='" & {Alt Text} & "'>"

Then in Softr, in your List or List Details block, add a field of type Text, and for its Content, select the “Img Tag” field.

That should do it.

I think this could work for multiple attachments in a single field in a given record, but would require a more interesting formula in Airtable.

WARNING: It’s unclear to me whether this approach will continue to work much longer. If I am reading this Airtable support document correctly, this approach should have stopped working on November 8. However, it still seems to work. I can’t tell whether that means it’s about to stop working, or if it’s actually not affected by the change.


Thanks so much for posting this @dcoletta, this will be an interesting learning for me :slight_smile:

Upvoting feature request for dynamic image alt text :point_up:

1 Like

Hey @Fizzle,

Vote is counted :slight_smile: Thanks

Upvoting as well for dynamic image alt text :muscle:t3:

1 Like

Your vote is counted @ft_agrinovateur, but did you check the workaround David suggested?

I tested the workaround and apparently it still works as of now. I don’t know why - it was supposed to stop working by now, but here we are.

Seems like it’s not affected by the change @dcoletta :slight_smile: and that’s cool.

The Airtable documentation is a bit unclear about whether the formula-generated URL for the attachment is supposed to work but only for a brief amount of time, or not supposed to work. I don’t think it’s safe to depend on this mechanism, but as a workaround until there’s a better way, it might be ok?

1 Like

Agree with you :star_struck: