> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nanoforge.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# getAsset

> Retrieve a registered file asset by its virtual path.

import { PageLink } from '/snippets/tsdocs/PageLink.jsx';
import { RefLink } from '/snippets/tsdocs/RefLink.jsx';

# getAsset

## Summary

Retrieve a registered file asset by its virtual path.

## Signature

```typescript theme={null}
getAsset(path: string): NfFile;
```

## Parameters

### path

**Type**:`string`

Virtual path of the asset (e.g. "/textures/hero.png").

## Returns

**Type**:`NfFile`

Retrieve a registered file asset by its virtual path.

## Remarks

The path is normalised before lookup: leading and duplicate slashes are collapsed and trailing slashes are removed.
