Use nhost.storage.getPublicUrl to get the public URL of a file. The public URL can be used for un-authenticated users to access files. To access public files the public role must have permissions to select the file in the storage.files table.

const publicUrl = nhost.storage.getPublicUrl({ fileId: '<File-ID>' })

Parameters


params required StorageGetUrlParams

PropertyTypeRequiredNotes
params.fileIdstring✔️
params.blurnumberImage blur, between 0 and 100
params.qualitynumberImage quality, between 1 and 100, 100 being the best quality
params.heightnumberImage height, in pixels
params.widthnumberImage width, in pixels