---
title: "getcustomasset"
description: "Copies a local file into the Roblox content area and returns its asset URI."
---

```lua
getcustomasset(path: string): string
```

---

## Aliases

None.

---

## Arguments

<ParamField body="path" type="string" required>
  A UTF-8 path relative to the Byte workspace.
</ParamField>

---

## Returns

<ResponseField name="uri" type="string">
  The registered local asset URI.
</ResponseField>

Returns an rbxasset://ByteInternal/ URI followed by the filename. Supply a real supported media file first. Matching basenames can collide.

**Related types:** [Filesystem types & behavior](/reference/filesystem/types).

---

## Example

```lua
if isfile("docs-example/icon.png") then
    local image = Instance.new("ImageLabel")
    image.Image = getcustomasset("docs-example/icon.png")
    print(image.Image)
    image:Destroy()
end
```
