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!
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?
Thanks for the response, Suzie! Standing by for the update
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.
Upvoting feature request for dynamic image alt text
Upvoting as well for dynamic image alt text
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.
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?
Agree with you
Please add my vote for this feature request too! I have a lot of images on my app and I’d like to add some kind of alt text or description to them.
Without a robust way to do this, Softr can’t be used for projects where accessibility is a critical concern (which should be pretty much every project).
This is a complete roadblock - a major issue.
Having said that, on the face of it, this should not be too hard for Softr to sort out.
You just need to be able, optionally, to point the Softr template to a single line Airtable text field containing the Alt Text whenever you specify an image. Job done.
The workaround proposed is very clever (thanks @dcolleta) but looks like it would have some serious limitations in terms of integration with the various templates.