For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Swift: Retrieve public URL

Examples

Returns the URL for an asset in a public bucket

let publicURL = supabase.storage
  .from("public-bucket")
  .publicURL(path: "folder/avatar1.png")

Returns the URL for an asset in a public bucket with transformations

let publicURL = supabase.storage
  .from("public-bucket")
  .publicURL(
    path: "folder/avatar1.png",
    options: PublicURLOptions(
      transform: ImageTransform(
        width: 100,
        height: 100
      )
    )
  )

Returns the URL which triggers the download of an asset in a public bucket

let publicURL = supabase.storage
  .from("public-bucket")
  .publicURL(
    path: "folder/avatar1.png",
    options: PublicURLOptions(download: .withOriginalName)
  )