# Supported File Types





Sample.app only serves recognized static file types. Files with unsupported extensions are blocked.

Web assets [#web-assets]

These core file types are served with appropriate `Content-Type` headers and caching:

| Extension | Content-Type             | Notes                                                                |
| --------- | ------------------------ | -------------------------------------------------------------------- |
| `.html`   | `text/html`              | Entry point for all routes. `index.html` is served for SPA fallback. |
| `.css`    | `text/css`               | Stylesheets, including source maps (`.css.map`).                     |
| `.js`     | `application/javascript` | Scripts, including source maps (`.js.map`).                          |
| `.mjs`    | `application/javascript` | ES modules.                                                          |
| `.json`   | `application/json`       | Data files, manifests, configuration.                                |
| `.xml`    | `application/xml`        | Sitemaps, RSS feeds, and other XML data.                             |
| `.txt`    | `text/plain`             | Plain text files, `robots.txt`.                                      |
| `.wasm`   | `application/wasm`       | WebAssembly modules.                                                 |

Images [#images]

| Extension        | Content-Type    | Notes                                                 |
| ---------------- | --------------- | ----------------------------------------------------- |
| `.png`           | `image/png`     | Lossless raster images.                               |
| `.jpg` / `.jpeg` | `image/jpeg`    | Lossy raster images.                                  |
| `.gif`           | `image/gif`     | Animated and static GIFs.                             |
| `.svg`           | `image/svg+xml` | Vector graphics. Can be inlined or served as files.   |
| `.webp`          | `image/webp`    | Modern lossy/lossless format. Recommended for photos. |
| `.avif`          | `image/avif`    | Next-gen format with excellent compression.           |
| `.ico`           | `image/x-icon`  | Favicons.                                             |

Fonts [#fonts]

| Extension | Content-Type                    | Notes                                 |
| --------- | ------------------------------- | ------------------------------------- |
| `.woff`   | `font/woff`                     | Web Open Font Format.                 |
| `.woff2`  | `font/woff2`                    | WOFF2—best compression. Recommended.  |
| `.ttf`    | `font/ttf`                      | TrueType fonts.                       |
| `.otf`    | `font/otf`                      | OpenType fonts.                       |
| `.eot`    | `application/vnd.ms-fontobject` | Legacy Internet Explorer font format. |

Media [#media]

| Extension | Content-Type | Notes                |
| --------- | ------------ | -------------------- |
| `.mp4`    | `video/mp4`  | Video files.         |
| `.webm`   | `video/webm` | Web-optimized video. |
| `.mp3`    | `audio/mpeg` | Audio files.         |
| `.ogg`    | `audio/ogg`  | Open audio format.   |

Documents [#documents]

| Extension | Content-Type      | Notes                 |
| --------- | ----------------- | --------------------- |
| `.pdf`    | `application/pdf` | PDF documents.        |
| `.csv`    | `text/csv`        | Comma-separated data. |

<Callout type="warn">
  File types not listed above are blocked. If you need support for an additional type, reach out to
  the team.
</Callout>

Bundle size limits [#bundle-size-limits]

All files in your output directory count toward the size limit. The maximum compressed archive size is **100 MB**.

<Callout type="warn">
  Large media files can eat into your quota quickly. Consider hosting videos and large images on a
  dedicated CDN.
</Callout>

Tips for optimizing your bundle [#tips-for-optimizing-your-bundle]

<Accordions type="single">
  <Accordion title="Compress images before building">
    Use tools like `sharp`, `imagemin`, or `squoosh` to compress images at build time. Prefer `.webp` or `.avif` over `.png` and `.jpg` for significantly smaller file sizes.
  </Accordion>

  <Accordion title="Use modern font formats">
    Serve fonts as `.woff2` only. It has the best compression and is supported by all modern browsers. Remove legacy formats (`.eot`, `.ttf`) unless you need Internet Explorer 11 support.
  </Accordion>

  <Accordion title="Remove source maps in production">
    Source maps (`.js.map`, `.css.map`) can significantly increase your bundle size. Most build tools let you disable them for production:

    ```ts title="vite.config.ts"
    export default defineConfig({
      build: {
        sourcemap: false,
      },
    });
    ```
  </Accordion>

  <Accordion title="Exclude unnecessary files">
    Check your output directory for files that shouldn't be deployed — test fixtures, documentation, or dev-only assets. Your framework's build config usually has options to control what's included.
  </Accordion>
</Accordions>
