I am trying to show user profile images based on constructed URL

My users table has a constructed URL column named “Photo” with URLs (which all work, based on manual checks) to user photos. (host blanked out in photo for security.) On the User Profile Layout, I have a Title component with “Simple” style and the “Photo” column selected as the Image source. Any reason why the image field will not load on the User Profile page?

1 Like

What do you see in the data editor?
The fact that your URL ends with .aspx suggests that it might be returning HTML rather than an actual image.

I see the correct URL in the data editor / data table, and if I copy that and paste it into a browser, it loads the image without fail. The image is then followed by two parameters, one of which is email, and that’s how it “gets to” the right user image file.

Are you sure it’s returning an actual image, and not an image embedded in some HTML?
I suspect the latter.
Try using the URL in a web embed component and see what you get.

I get an error, “ refused to connect.” (it reports the correct hostname)

Okay, that just means that the remote host doesn’t allow iFrame embedding, so we can ignore that.

But again, I’m fairly certain that your URL is returning HTML, and a component that expects an image doesn’t handle HTML.

Just to demonstrate that it does work if the URL returns an actual image, I picked a random image from pexels and configured a URL column:

I then used that in a Title component, here is the result:

In terms of workaround, what you can probably do is pass your URL column to a Get Webpage Source column, then pass that to an AI column, and instruct it to extract the image URL.

1 Like

I agree with @Darren_Murphy that the url is returning an html page that includes the image within it. What I would do is copy and paste the url into a new browser tab like you did, and then inspect the image itself on that page to see if the image url is something that you can dynamically build?

2 Likes

Thanks @Jeff_Hager and @Darren_Murphy for your guidance on this. On second check, you are both 100% correct, it’s returning the image on a page. The Chrome tab just said “userimage.jpg” so I assumed it was only the image that was opening, but it is indeed a page. After rebuilding the URL to the image in the Glide data table, I get a “ERROR 403: Time-Limited URL validation failed” - however, if I only change the “%40” that is substituted for the “@” in the email address (a query in the URL), it works. I feel like I’m close! Does this help any? Really appreciate both of your help on this…

I’m going to let ChatGPT answer this because it’s better than I could explain it…

A 403 error basically means “you’re not allowed in.”

In your case, the full message says:

Time-Limited URL validation failed

That means the link you’re using to the image is temporary — it has some sort of “expiration clock” or “signature check” built into it. These kinds of links are common with services like Glide, AWS, Google, etc. They generate a signed URL that only works for a short time and only if the URL hasn’t been altered.

So here’s what’s happening:

When Glide gives you the image URL, it includes an encoded query string (that messy part after the ?).

That string has to be exactly the same for the service to say “yes, this is valid.”

If you rebuild the URL but even a single character isn’t what the system expects, the signature check fails, and you get the 403 error.

The special %40 is the URL-safe encoding of @. The reason it works when you replace %40 with @ is probably because the service expects that exact format at validation time. If you rebuild the URL but encode/decode something differently, the “math” that checks whether the URL is still authentic doesn’t add up anymore.

:backhand_index_pointing_right: In other words:
You’re really close — but you can’t freely rebuild or “re-encode” parts of a time-limited URL. The service will reject it if it doesn’t match exactly what it originally signed.

3 Likes

Thanks @Jeff_Hager!

1 Like