---
description: Serve Workers Static Assets from a URL path prefix using Wrangler or cloudflare.config.ts.
title: Serve Workers Static Assets from a URL path prefix
image: https://developers.cloudflare.com/changelog/post/2026-10-28-static-assets-base-path/og.png?v=ed4e43585739a15e
---

[Skip to content](#main-content)

[View RSS feeds](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) [ Subscribe to RSS](https://developers.cloudflare.com/changelog/rss/index.xml)

[Back to all posts](https://developers.cloudflare.com/changelog)

October 28, 2026

## Serve Workers Static Assets from a URL path prefix

[Workers](https://developers.cloudflare.com/workers/) [Cloudflare CLI](https://developers.cloudflare.com/cf/)

Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/changelog/post/2026-10-28-static-assets-base-path/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

Workers Static Assets can now serve assets from a URL path prefix without changing their directory structure. Set `assets.base_path` in Wrangler, or `worker.assets.basePath` in `cloudflare.config.ts`.

Use [Wrangler 4.148.0 ↗︎](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.148.0) or later. With `cloudflare.config.ts`, use [`cf` 1.0.0-beta.13 ↗︎](https://github.com/cloudflare/cf/releases/tag/cf%401.0.0-beta.13) or later.

For example, this configuration serves your built assets from `/blog/`:

Select your preferred CLI

WranglerCF

Changes examples on this page to use the selected CLI.

```jsonc
{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "assets": {
    "directory": "./dist",
    "base_path": "/blog"
  }
}
```

```toml
[assets]
directory = "./dist"
base_path = "/blog"
```

*cloudflare.config.tsts*

```ts
import { defineConfig } from "cf/config";

export default defineConfig({
worker: {
  name: "blog",
  // Set this to today's date
  compatibilityDate: "2026-11-06",
  assets: {
    basePath: "/blog",
  },
},
});
```

With Wrangler, `assets.directory` selects the directory to serve. With [`cloudflare.config.ts`](https://developers.cloudflare.com/cf/projects/cloudflare-config/), your build configuration supplies the assets.

To configure the option, refer to [Serving a subdirectory](https://developers.cloudflare.com/workers/static-assets/routing/advanced/serving-a-subdirectory/).

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/post/2026-10-28-static-assets-base-path/#page","headline":"Serve Workers Static Assets from a URL path prefix","description":"Serve Workers Static Assets from a URL path prefix using Wrangler or cloudflare.config.ts.","url":"https://developers.cloudflare.com/changelog/post/2026-10-28-static-assets-base-path/","inLanguage":"en","image":"https://developers.cloudflare.com/changelog/post/2026-10-28-static-assets-base-path/og.png?v=ed4e43585739a15e","dateModified":"2026-10-28","datePublished":"2026-10-28","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
