URL to Image

I have a list of URLs in my sheet. I’ve gotten this information with zapier, but they alternate between image URLs and video URLs. If the link is a video, it works perfectly. But if it is a picture, it won’t show it, because it is in a link format. How can I change an URL to an picture in glide?

Example of image URL: https://scontent-ort2-1.cdninstagram.com/v/t51.2885-15/310265251_400883645577018_1618500143540975632_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=8ae9d6&_nc_ohc=yWtAf1Xq8D8AX93BcgA&_nc_ht=scontent-ort2-1.cdninstagram.com&edm=ANo9K5cEAAAA&oh=00_AT_G1DwToNwVXxrND3nWn4lzdciK-Lk_-ICZcagwOCPn6Q&oe=63439375

You use Image components to display images and video components to display videos. If your column contains URLs for both, then you’ll need an IF column that can check within the url to determine if it’s an image or a video. The IF column could check if the url INCLUDES ‘jpg’ for example. If it does, then return the word ‘image’. Else return the word ‘video’. Or something along those lines. Then set a visibility condition on your image component to only show if the IF column is ‘image’. Likewise, display the video component if the IF column is ‘video’.

2 Likes