--- import client from "@/data/pocketbase"; const { class: className, recipe } = Astro.props async function getLink(img: string) { const record = await client.collection("images").getOne(img) const link = await client.files.getRelativeURL(record, record.image) return link } // Use Promise.all to wait for all async operations to complete const links = await Promise.all( recipe.images.map((img: string) => getLink(img)) ) ---