Dynamic/constructed URL for Image?

Is it possible to feed the image-cell with a dynamic/constructed URL where it should fetch the image from?

From what I can see you can only update images via the image-picker

Lets say you need to grab user-image from the corporate employee directory in the form https://example.com/emppic/someuser.jpg

The only thing that stored in an image column is a url. It’s just text. You could switch the type from image to text and you will see the url of there is one. There is really nothing special to an image column other than it can render an image in the table.

All you need is a template column to formulate the url by joining the root url text with other column values. So yes it’s possible. How to do it depends on how your data is set up. If you are pulling the name from the email, like you are showing, then you will have to first split the email into parts, so you can get the person’s name, and then join it to the url with a template column. If you already have a separate column with just the person’s name, then a template column is all you need.

So, in the end, you image column does not need to be designated as an image type column. Anything will work, including a template column. The table does not store images. It only stores the url for the real image location.

1 Like

I got you! I was under the impression that the image-field was a special type (~blob), so I was struggling to stuff in the constructed URL. But i see now, I can just tell field that will display it, that’s it of the type ‘Image’
Still trying to get use to, that a lot of the handling happens at the form/display level rather than on the table in the DB.
Thanks for opening my eyes :blush:

1 Like

Yeah, I think it’s a common misconception that it’s a BLOB type, especially when the table renders the image.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.