Attachment changes and API

Hello all, I have a question regarding the changes to the attachment url’s.
I have images stored on Airtable that I fetch using the API and display them on my site. I am not using the any permanent link. Whenever a user accesses the site, it requests the data and gets the image url and displays it. Will the changes affect this use case? For example, I know that cloudfare may cache the temporary url and then feed it to the public, but does that mean that some users will get a blank image instead of the new url?

Thanks in advance

As long as there is always a fresh call to the Airtable REST API with each visit, you should be fine.

1 Like

If upon every visit your page requests the URL from API, this should be OK, but would be best suited for page with small number of visits.

If you expect high number of traffic it would be best to cache those images somewhere. Not sure what exactly you are using to build your page - but if React - Next JS has a fantastic cached and optimized image element (including responsive and format optimization):

As image source you could use NextJs API route, which would make request to Airtable API. This works with high traffic volume, but also also you can set how often to revalidate and re-request the image from Airtable.

1 Like

Thank you! Yes at the moment I am requesting it with each visit. Do you think this might be an issue with Cloudfare?

That’s pretty neat, thank you! Sadly the client wanted the project to be built in Framer, so I can’t go the NextJS route. And because we don’t have access to routing inside Framer, I need to load info from Airtable using url params, with each visit, as there is no dynamic routing. Luckily, it is a very low traffic site.

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.