Help

Re: Image URL Formula?

Solved
Jump to Solution
3761 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_Baugher
4 - Data Explorer
4 - Data Explorer

I’m hoping someone might be able to help me figure this out… To put it simply I have one column full of images (just one image in each cell) but 1000’s of images total. I need another column, residing next to it that contains the URL for each image, and I haven’t found an easy way to do this aside from just copy and pasting each individual URL. Which gets very repetitive and time consuming doing this thousands of times. Is there a formula out there that could pull these image URL’s and fill each corresponding cell (to the right of the image cell) with the URL (of the image in the cell to the left of it)? Maybe I’ve just been looking at it for too long and there’s a much simpler solution?

1 Solution

Accepted Solutions
Jason
Airtable Employee
Airtable Employee

Hi @Michael_Baugher ,

You can use a formula like this:

SUBSTITUTE(
  MID(
    {Attachment Field},
    FIND(
      "https://dl",
      {Attachment Field}
    ),
    250
  ),
  ")",
  ""
)

Just make sure to replace {Attachment Field} with the actual name of the field you’re using to store them.

See Solution in Thread

9 Replies 9
Jason
Airtable Employee
Airtable Employee

Hi @Michael_Baugher ,

You can use a formula like this:

SUBSTITUTE(
  MID(
    {Attachment Field},
    FIND(
      "https://dl",
      {Attachment Field}
    ),
    250
  ),
  ")",
  ""
)

Just make sure to replace {Attachment Field} with the actual name of the field you’re using to store them.

Michael_Baugher
4 - Data Explorer
4 - Data Explorer

Worked like a charm! Thanks so much, saved me hours of copy/pasting!

Happy to help Michael!

ScottWorld
18 - Pluto
18 - Pluto

This is a very old thread, so please note that those formulas mentioned above will no longer work in 2023 and beyond, because Airtable will no longer return working attachment URLs using formulas.

Note that Airtable WILL return proper URLs through automations (or external API tools like Make), but those are only temporary URLs that expire after 2 hours of being looked at for the first time.

So if you want external access to an image or a PDF file or an attachment for longer than 2 hours, you will need to move the image somewhere else (such as Google Drive).

If you need this process to be completely automated, you can use Make's advanced automations & integrations to automate the process of moving the attachments out of Airtable and into a publicly-accessible cloud drive (such as Google Drive).

There is a small learning curve with Make, which is why I created this basic navigation video to help. I also provide the links to a few other Make training resources there as well.

Hope this helps! If you’d like to hire an expert Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld

fkoimburi
4 - Data Explorer
4 - Data Explorer

Hey Scott. Do you known if already expired links are accessible after the fact? I am using Bubble to access images within my Airtable DB and I was unaware about the expiration of the links until users had began accessing hundreds of images on the live web app of our family photography business. So essentially users have already made their orders and selected their images, and we are seated with image-less orders that require some sort of "recovery".

Thanks in advance.

ScottWorld
18 - Pluto
18 - Pluto

If you create a formula field that points to your attachment field, you will see a URL that no longer works anymore.

I have no idea why Airtable hasn't fixed formula fields to just eliminate that URL altogether (since it no longer works).

So, in other words, if you create a formula field that points to your attachment field, you will end up with an invalid result.

Hope this helps! If you’d like to hire an expert Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld

fkoimburi
4 - Data Explorer
4 - Data Explorer

Thanks Scott.

I may not have explained myself very well. On the web development platform that I am using, the images users see reside in Airtable and they are being pulled via an API. The images themselves are accessible to me on the Airtable backend, but it is in my web based platform (Bubble) where the dead URL lies. I have no idea of knowing what images the users selected. When I do as you have suggested, all it does is give me the URL of the already-existing image on the Airtable side. 

What am I missing? Again, apologies if I am not making myself very clear -- this particular functionality of Airtable is new to me.

ScottWorld
18 - Pluto
18 - Pluto

Sorry, I have never used Bubble before so I have no idea how it works, but it sounds like Bubble in 2023 didn't work properly with Airtable's attachment fields.

It is now 2024 (almost 2025), so hopefully Bubble has fixed how things work when communicating with Airtable.

In general, all of Bubble's competitors that have full native support for Airtable work 100% perfectly with Airtable's attachment fields, because all of them have already taken care of this issue for you.

I’m thinking of Airtable portal apps like Noloco, Softr, JetAdmin, and Glide. All of these work 100% perfectly with Airtable.

These apps are designed to work properly with attachment fields — they always pull the latest URL of the attachment fields, which is done automatically when making calls to Airtable's API.

All of the apps that I mentioned above do this automatically, so if Bubble isn't handling it properly, then I would either talk to the Bubble people about this, or simply use one of the apps that handles this behavior properly.

Hope this helps! If you’d like to hire an expert Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld

Thanks Scott. I'll keep searching.