The bucket needs to be set to public, either via updateBucket() or by going to Storage on supabase.com/dashboard, clicking the overflow menu on a bucket and choosing "Make public"
RLS policy permissions required:
buckets table permissions: none
objects table permissions: none
Refer to the Storage guide on how access control works
Parameters
path
(Required)
The path of the file you want to get the public url for.
Examples
Returns the URL for an asset in a public bucket
val url = supabase.storage.from("public-bucket").publicUrl("folder/avatar1.png")
Returns the URL for an asset in a public bucket with transformations
val url = supabase.storage.from("public-bucket").publicRenderUrl("folder/avatar1.png") \{
size(100, 100)
\}