> For the complete documentation index, see [llms.txt](https://weekerp.gitbook.io/image/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://weekerp.gitbook.io/image/storage/basepath.md).

# BasePath

**BasePath** is an option that defines the root directory path within a bucket from which resources are served. In other words, it specifies the **top-level directory** that the CDN will use as the base when fetching files.

***

#### Example

Assume the following files are stored in your bucket:

```
/dog.jpg
/assets/cat.png
```

In this case, **BasePath** can be configured in the following :

<table><thead><tr><th width="96.999755859375">Setting</th><th width="294.7144775390625">Description</th><th>Example (Weekerp)</th></tr></thead><tbody><tr><td><code>/</code></td><td>Access all files from the root directory of the bucket.</td><td><code>https://cdn.weekerp.com/image/mysource/dog.jpg</code></td></tr><tr><td><code>/assets</code></td><td>Set the <code>assets</code> folder as the root directory.</td><td><code>https://cdn.weekerp.com/image/mysource/cat.jpg</code></td></tr><tr><td><code>/</code> </td><td>When the <code>assets</code> folder is <strong>not</strong> defined as BasePath, the folder name remains part of the path.</td><td><code>https://cdn.weekerp.com/image/mysource/assets/cat.jpg</code></td></tr></tbody></table>

***

#### Notes

* **BasePath** can be set individually for each **Source** (bucket).
* The configured BasePath is automatically appended to the path during CDN requests.

  ```
  https://cdn.weekerp.com/image/{source}/{basePath}/cat.png
  ```
* When set to the root (`/`), all paths are served as-is.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://weekerp.gitbook.io/image/storage/basepath.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
