Oct 31, 2022 02:56 AM
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
Solved! Go to Solution.
Oct 31, 2022 04:50 AM
As long as there is always a fresh call to the Airtable REST API with each visit, you should be fine.
Oct 31, 2022 04:50 AM
As long as there is always a fresh call to the Airtable REST API with each visit, you should be fine.
Oct 31, 2022 06:08 AM
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.
Nov 01, 2022 03:45 AM
Thank you! Yes at the moment I am requesting it with each visit. Do you think this might be an issue with Cloudfare?
Nov 01, 2022 03:49 AM
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.